* [PATCH] iio: dac: ad5791: fix storage
@ 2025-01-22 23:16 David Lechner
2025-01-24 12:48 ` Nuno Sá
0 siblings, 1 reply; 3+ messages in thread
From: David Lechner @ 2025-01-22 23:16 UTC (permalink / raw)
To: Michael Hennerich, Jonathan Cameron
Cc: linux-iio, linux-kernel, David Lechner
IIO uses "natural" alignment so storagebits should always be a power of
2. Change storagebits to 32 since that is the natural size to store 24
bits of data.
The ad5791 driver currently doesn't use this field anywhere and doesn't
support buffered writes, so this does not change anything. We just don't
want anyone to think that it is OK to have storagebits = 24 in other
drivers.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
Since this is purely cosmetic, I didn't bother with a fixes flag.
---
drivers/iio/dac/ad5791.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/dac/ad5791.c b/drivers/iio/dac/ad5791.c
index 57374f78f6b885e1d4f2fb452ac0563b85fc222e..034228a7c059f136cdecfb4683228d0be4c37477 100644
--- a/drivers/iio/dac/ad5791.c
+++ b/drivers/iio/dac/ad5791.c
@@ -294,7 +294,7 @@ static const struct ad5791_chip_info _name##_chip_info = { \
.scan_type = { \
.sign = 'u', \
.realbits = (bits), \
- .storagebits = 24, \
+ .storagebits = 32, \
.shift = (_shift), \
}, \
.ext_info = ad5791_ext_info, \
---
base-commit: 012b8276f08a67b9f2e2fd0f35363ae4a75e5267
change-id: 20250122-iio-dac-ad5791-fix-storagebits-9f86efa07abb
Best regards,
--
David Lechner <dlechner@baylibre.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: dac: ad5791: fix storage
2025-01-22 23:16 [PATCH] iio: dac: ad5791: fix storage David Lechner
@ 2025-01-24 12:48 ` Nuno Sá
2025-01-25 12:19 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Nuno Sá @ 2025-01-24 12:48 UTC (permalink / raw)
To: David Lechner, Michael Hennerich, Jonathan Cameron
Cc: linux-iio, linux-kernel
On Wed, 2025-01-22 at 17:16 -0600, David Lechner wrote:
> IIO uses "natural" alignment so storagebits should always be a power of
> 2. Change storagebits to 32 since that is the natural size to store 24
> bits of data.
>
> The ad5791 driver currently doesn't use this field anywhere and doesn't
> support buffered writes, so this does not change anything. We just don't
> want anyone to think that it is OK to have storagebits = 24 in other
> drivers.
>
> Signed-off-by: David Lechner <dlechner@baylibre.com>
> ---
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> Since this is purely cosmetic, I didn't bother with a fixes flag.
> ---
> drivers/iio/dac/ad5791.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/dac/ad5791.c b/drivers/iio/dac/ad5791.c
> index
> 57374f78f6b885e1d4f2fb452ac0563b85fc222e..034228a7c059f136cdecfb4683228d0be4c3
> 7477 100644
> --- a/drivers/iio/dac/ad5791.c
> +++ b/drivers/iio/dac/ad5791.c
> @@ -294,7 +294,7 @@ static const struct ad5791_chip_info _name##_chip_info =
> { \
> .scan_type = { \
> .sign = 'u', \
> .realbits = (bits), \
> - .storagebits = 24, \
> + .storagebits = 32, \
> .shift = (_shift), \
> }, \
> .ext_info = ad5791_ext_info, \
>
> ---
> base-commit: 012b8276f08a67b9f2e2fd0f35363ae4a75e5267
> change-id: 20250122-iio-dac-ad5791-fix-storagebits-9f86efa07abb
>
> Best regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: dac: ad5791: fix storage
2025-01-24 12:48 ` Nuno Sá
@ 2025-01-25 12:19 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2025-01-25 12:19 UTC (permalink / raw)
To: Nuno Sá; +Cc: David Lechner, Michael Hennerich, linux-iio, linux-kernel
On Fri, 24 Jan 2025 12:48:21 +0000
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Wed, 2025-01-22 at 17:16 -0600, David Lechner wrote:
> > IIO uses "natural" alignment so storagebits should always be a power of
> > 2. Change storagebits to 32 since that is the natural size to store 24
> > bits of data.
> >
> > The ad5791 driver currently doesn't use this field anywhere and doesn't
> > support buffered writes, so this does not change anything. We just don't
> > want anyone to think that it is OK to have storagebits = 24 in other
> > drivers.
> >
> > Signed-off-by: David Lechner <dlechner@baylibre.com>
> > ---
>
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Applied to the testing branch of iio.git.
Thanks,
Jonathan
>
> > Since this is purely cosmetic, I didn't bother with a fixes flag.
> > ---
> > drivers/iio/dac/ad5791.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/dac/ad5791.c b/drivers/iio/dac/ad5791.c
> > index
> > 57374f78f6b885e1d4f2fb452ac0563b85fc222e..034228a7c059f136cdecfb4683228d0be4c3
> > 7477 100644
> > --- a/drivers/iio/dac/ad5791.c
> > +++ b/drivers/iio/dac/ad5791.c
> > @@ -294,7 +294,7 @@ static const struct ad5791_chip_info _name##_chip_info =
> > { \
> > .scan_type = { \
> > .sign = 'u', \
> > .realbits = (bits), \
> > - .storagebits = 24, \
> > + .storagebits = 32, \
> > .shift = (_shift), \
> > }, \
> > .ext_info = ad5791_ext_info, \
> >
> > ---
> > base-commit: 012b8276f08a67b9f2e2fd0f35363ae4a75e5267
> > change-id: 20250122-iio-dac-ad5791-fix-storagebits-9f86efa07abb
> >
> > Best regards,
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-25 12:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-22 23:16 [PATCH] iio: dac: ad5791: fix storage David Lechner
2025-01-24 12:48 ` Nuno Sá
2025-01-25 12:19 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®