iio: sx9360: enable push iio event
PATCH 1/1 iio: sx9360: enable push iio event
From: Jongpil Jung <[email protected]>
To convert SX9360 status register ["REG_STAT"], into a channel index, we need to right shift by |stat_offset|, not left shift. Also the PROXSTAT bit (3) is for channel 1 (PHM, PHase Measured), not (PHR, PHase Reference, channel 0), so the offset is 2 instead of 3.
--- drivers/iio/proximity/sx9360.c | 2 +- drivers/iio/proximity/sx_common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/iio/proximity/sx9360.c +1 -1
@@ -775,7 +775,7 @@ static const struct sx_common_chip_info sx9360_chip_info = { .reg_reset = SX9360_REG_RESET, .mask_enable_chan = SX9360_REG_GNRL_CTRL0_PHEN_MASK, - .stat_offset = 3, + .stat_offset = 2, .num_channels = SX9360_NUM_CHANNELS, .num_default_regs = ARRAY_SIZE(sx9360_default_regs),
drivers/iio/proximity/sx_common.c +1 -1
@@ -87,7 +87,7 @@ static void sx_common_push_events(struct iio_dev *indio_dev)return ; } - val <<= data->chip_info->stat_offset; + val >>= data->chip_info->stat_offset;/* * Only iterate over channels with changes on proximity status that have
Signature · 1 line
2.34.1.703.g22d0c6ccf7-goog
Jonathan Cameron
maintainerQuoted 1 line · On Tue, 18 Jan 2022 13:25:04 -0800 Gwendal Grignou <[email protected]> wrote:
From: Jongpil Jung <[email protected]>
Hi,
Patch title is not really clear. It suggests this is enabling a new feature rather than fixing anything. Please rephrase.
Quoted 2 lines
Fixes f75095753 ("iio:proximity:sx9360: Add sx9360 support")
This is part of the tag block so should appear.
Quoted 6 lines
To convert SX9360 status register ["
REG_STAT"], into a channel index, we need to right shift by |stat_offset|, not left shift. Also the PROXSTAT bit (3) is for channel 1 (PHM, PHase Measured), not (PHR, PHase Reference, channel 0), so the offset is 2 instead of 3.
Phase
fixes tag should be here.
Quoted 2 lines
Signed-off-by Jongpil Jung <[email protected]>Signed-off-by Gwendal Grignou <[email protected]>
Thanks,
Jonathan
Quoted 31 lines
--- drivers/iio/proximity/sx9360.c | 2 +- drivers/iio/proximity/sx_common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/iio/proximity/sx9360.c +1
-1@@ -775,7 +775,7 @@ static const struct sx_common_chip_info sx9360_chip_info = { .reg_reset = SX9360_REG_RESET, .mask_enable_chan = SX9360_REG_GNRL_CTRL0_PHEN_MASK, - .stat_offset = 3, + .stat_offset = 2, .num_channels = SX9360_NUM_CHANNELS, .num_default_regs = ARRAY_SIZE(sx9360_default_regs),drivers/iio/proximity/sx_common.c +1
-1@@ -87,7 +87,7 @@ static void sx_common_push_events(struct iio_dev *indio_dev)return ; } - val <<= data->chip_info->stat_offset; + val >>= data->chip_info->stat_offset;/* * Only iterate over channels with changes on proximity status that have
Quoted 2 lines · Jonathan Cameron
On Tue, 18 Jan 2022 13:25:04 -0800
Gwendal Grignou <[email protected]> wrote:
...
Quoted 7 lines
Quoted 1 line
Fixes f75095753 ("iio:proximity:sx9360: Add sx9360 support")This is part of the tag block so should appear.
fixes tag should be here.
Quoted 2 lines
Signed-off-by Jongpil Jung <[email protected]>Signed-off-by Gwendal Grignou <[email protected]>
...and the submitter's SoB must be last (according to the documentation).
Signature · 2 lines
With Best Regards, Andy Shevchenko
Jonathan Cameron
maintainerQuoted 7 lines · On Sat, 22 Jan 2022 20:15:57 +0200 Andy Shevchenko <[email protected]>…
Quoted 2 lines · Jonathan Cameron
On Tue, 18 Jan 2022 13:25:04 -0800
Gwendal Grignou <[email protected]> wrote:...
Quoted 1 line
Quoted 1 line
Fixes f75095753 ("iio:proximity:sx9360: Add sx9360 support")
Quoted 9 lines
Quoted 6 lines
This is part of the tag block so should appear.
fixes tag should be here.
Quoted 2 lines
Signed-off-by Jongpil Jung <[email protected]>Signed-off-by Gwendal Grignou <[email protected]>...and the submitter's SoB must be last (according to the documentation).
Hi Andy,
If it's a handling chain, rather that about co development etc then I'd expect it to be in this order to indicate that Gwendal was on the route to upstream.
"Any further SoBs (Signed-off-by:'s) following the author's SoB are from people handling and transporting the patch, but were not involved in its development. SoB chains should reflect the **real** route a patch took as it was propagated to the maintainers and ultimately to Linus, with the first SoB entry signalling primary authorship of a single author."
Jonathan
Quoted 4 lines · Jonathan Cameron
On Sat, 22 Jan 2022 20:15:57 +0200
Andy Shevchenko <[email protected]> wrote:
Quoted 8 lines
Quoted 8 lines · Jonathan Cameron
Quoted 2 lines
On Tue, 18 Jan 2022 13:25:04 -0800
Gwendal Grignou <[email protected]> wrote:...
Quoted 2 lines
Quoted 1 line
Fixes f75095753 ("iio:proximity:sx9360: Add sx9360 support")This is part of the tag block so should appear.
Done: The patch is at
https://lore.kernel.org/all/[email protected]/.
Given the title change, it is not automatically connected to this patch. I should have added a --in-reply-to argument to my git send-mail command, will do better next time.
Gwendal.
Quoted 21 lines
Quoted 8 lines
Quoted 5 lines
fixes tag should be here.
Quoted 2 lines
Signed-off-by Jongpil Jung <[email protected]>Signed-off-by Gwendal Grignou <[email protected]>...and the submitter's SoB must be last (according to the documentation).
Hi Andy,
If it's a handling chain, rather that about co development etc then I'd expect it to be in this order to indicate that Gwendal was on the route to upstream.
"Any further SoBs (Signed-off-by:'s) following the author's SoB are from people handling and transporting the patch, but were not involved in its development. SoB chains should reflect the **real** route a patch took as it was propagated to the maintainers and ultimately to Linus, with the first SoB entry signalling primary authorship of a single author."
Jonathan