Message ID | 20240430120535.46097-3-dima.fedrau@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | Add threshold events support and some minor cleanup | expand |
On Tue, 30 Apr 2024 14:05:32 +0200 Dimitri Fedrau <dima.fedrau@gmail.com> wrote: > Move bit IIO_CHAN_INFO_SCALE from info_mask_separate to > info_mask_shared_by_all since temperature format is the same for all > channels. > > Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com> Whilst this shouldn't be a problem for well behaved userspace, it is an ABI change so as a general rule we don't 'fix' cases like this once they have been in a kernel release. We may be break someone's hand crafted scripts :( Jonathan > --- > drivers/iio/temperature/mcp9600.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/iio/temperature/mcp9600.c b/drivers/iio/temperature/mcp9600.c > index e277edb4ae4b..74e0782fb073 100644 > --- a/drivers/iio/temperature/mcp9600.c > +++ b/drivers/iio/temperature/mcp9600.c > @@ -28,16 +28,16 @@ static const struct iio_chan_spec mcp9600_channels[] = { > .address = MCP9600_HOT_JUNCTION, > .channel2 = IIO_MOD_TEMP_OBJECT, > .modified = 1, > - .info_mask_separate = > - BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE), > + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), > + .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SCALE), > }, > { > .type = IIO_TEMP, > .address = MCP9600_COLD_JUNCTION, > .channel2 = IIO_MOD_TEMP_AMBIENT, > .modified = 1, > - .info_mask_separate = > - BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE), > + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), > + .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SCALE), > }, > }; >
Am Tue, Apr 30, 2024 at 01:09:34PM +0100 schrieb Jonathan Cameron: > On Tue, 30 Apr 2024 14:05:32 +0200 > Dimitri Fedrau <dima.fedrau@gmail.com> wrote: > > > Move bit IIO_CHAN_INFO_SCALE from info_mask_separate to > > info_mask_shared_by_all since temperature format is the same for all > > channels. > > > > Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com> > > Whilst this shouldn't be a problem for well behaved userspace, > it is an ABI change so as a general rule we don't 'fix' cases like > this once they have been in a kernel release. > > We may be break someone's hand crafted scripts :( > Ok, will remove the patch from the series. Best regards, Dimitri Fedrau > > > --- > > drivers/iio/temperature/mcp9600.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/iio/temperature/mcp9600.c b/drivers/iio/temperature/mcp9600.c > > index e277edb4ae4b..74e0782fb073 100644 > > --- a/drivers/iio/temperature/mcp9600.c > > +++ b/drivers/iio/temperature/mcp9600.c > > @@ -28,16 +28,16 @@ static const struct iio_chan_spec mcp9600_channels[] = { > > .address = MCP9600_HOT_JUNCTION, > > .channel2 = IIO_MOD_TEMP_OBJECT, > > .modified = 1, > > - .info_mask_separate = > > - BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE), > > + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), > > + .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SCALE), > > }, > > { > > .type = IIO_TEMP, > > .address = MCP9600_COLD_JUNCTION, > > .channel2 = IIO_MOD_TEMP_AMBIENT, > > .modified = 1, > > - .info_mask_separate = > > - BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE), > > + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), > > + .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SCALE), > > }, > > }; > > >
diff --git a/drivers/iio/temperature/mcp9600.c b/drivers/iio/temperature/mcp9600.c index e277edb4ae4b..74e0782fb073 100644 --- a/drivers/iio/temperature/mcp9600.c +++ b/drivers/iio/temperature/mcp9600.c @@ -28,16 +28,16 @@ static const struct iio_chan_spec mcp9600_channels[] = { .address = MCP9600_HOT_JUNCTION, .channel2 = IIO_MOD_TEMP_OBJECT, .modified = 1, - .info_mask_separate = - BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE), + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SCALE), }, { .type = IIO_TEMP, .address = MCP9600_COLD_JUNCTION, .channel2 = IIO_MOD_TEMP_AMBIENT, .modified = 1, - .info_mask_separate = - BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE), + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SCALE), }, };
Move bit IIO_CHAN_INFO_SCALE from info_mask_separate to info_mask_shared_by_all since temperature format is the same for all channels. Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com> --- drivers/iio/temperature/mcp9600.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)