* [PATCH] iio: st_sensors: remap SMO8840 to LIS2DH12
@ 2020-02-24 9:54 Wen-chien Jesse Sung
2020-02-24 19:23 ` Hans de Goede
0 siblings, 1 reply; 3+ messages in thread
From: Wen-chien Jesse Sung @ 2020-02-24 9:54 UTC (permalink / raw)
To: linux-iio; +Cc: Hans de Goede
According to ST, the HID is for LIS2DH12.
Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
drivers/iio/accel/st_accel_i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
index 633955d764cc..849cf74153c4 100644
--- a/drivers/iio/accel/st_accel_i2c.c
+++ b/drivers/iio/accel/st_accel_i2c.c
@@ -110,7 +110,7 @@ MODULE_DEVICE_TABLE(of, st_accel_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id st_accel_acpi_match[] = {
- {"SMO8840", (kernel_ulong_t)LNG2DM_ACCEL_DEV_NAME},
+ {"SMO8840", (kernel_ulong_t)LIS2DH12_ACCEL_DEV_NAME},
{"SMO8A90", (kernel_ulong_t)LNG2DM_ACCEL_DEV_NAME},
{ },
};
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: st_sensors: remap SMO8840 to LIS2DH12
2020-02-24 9:54 [PATCH] iio: st_sensors: remap SMO8840 to LIS2DH12 Wen-chien Jesse Sung
@ 2020-02-24 19:23 ` Hans de Goede
2020-03-01 14:22 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2020-02-24 19:23 UTC (permalink / raw)
To: Wen-chien Jesse Sung, linux-iio
Hi,
On 2/24/20 10:54 AM, Wen-chien Jesse Sung wrote:
> According to ST, the HID is for LIS2DH12.
>
> Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
I added the original "SMO8840" entry since I did not have any
docs I just copied the "SMO8A90" entry. Looking at the driver
the only difference seems to be that the LNG2DM only has 8 bits
accuracy where as the LIS2DH12 has 12 bits. I can confirm that
this patch works on my Lenovo Ideapad Miix 320, for which the
original patch was submitted, and that I indeed get 12 bits of
accuracy with this patch.
So this patch is:
Tested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/iio/accel/st_accel_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
> index 633955d764cc..849cf74153c4 100644
> --- a/drivers/iio/accel/st_accel_i2c.c
> +++ b/drivers/iio/accel/st_accel_i2c.c
> @@ -110,7 +110,7 @@ MODULE_DEVICE_TABLE(of, st_accel_of_match);
>
> #ifdef CONFIG_ACPI
> static const struct acpi_device_id st_accel_acpi_match[] = {
> - {"SMO8840", (kernel_ulong_t)LNG2DM_ACCEL_DEV_NAME},
> + {"SMO8840", (kernel_ulong_t)LIS2DH12_ACCEL_DEV_NAME},
> {"SMO8A90", (kernel_ulong_t)LNG2DM_ACCEL_DEV_NAME},
> { },
> };
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: st_sensors: remap SMO8840 to LIS2DH12
2020-02-24 19:23 ` Hans de Goede
@ 2020-03-01 14:22 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2020-03-01 14:22 UTC (permalink / raw)
To: Hans de Goede; +Cc: Wen-chien Jesse Sung, linux-iio
On Mon, 24 Feb 2020 20:23:28 +0100
Hans de Goede <hdegoede@redhat.com> wrote:
> Hi,
>
> On 2/24/20 10:54 AM, Wen-chien Jesse Sung wrote:
> > According to ST, the HID is for LIS2DH12.
> >
> > Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
>
> I added the original "SMO8840" entry since I did not have any
> docs I just copied the "SMO8A90" entry. Looking at the driver
> the only difference seems to be that the LNG2DM only has 8 bits
> accuracy where as the LIS2DH12 has 12 bits. I can confirm that
> this patch works on my Lenovo Ideapad Miix 320, for which the
> original patch was submitted, and that I indeed get 12 bits of
> accuracy with this patch.
>
> So this patch is:
>
> Tested-by: Hans de Goede <hdegoede@redhat.com>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>
Applied to the fixes-togreg branch of iio.git with fixes
and stable tags added.
Whilst it isn't vital this gets backported, it seems unlikely
to do any harm.
Thanks,
Jonathan
> Regards,
>
> Hans
>
>
>
>
> > ---
> > drivers/iio/accel/st_accel_i2c.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
> > index 633955d764cc..849cf74153c4 100644
> > --- a/drivers/iio/accel/st_accel_i2c.c
> > +++ b/drivers/iio/accel/st_accel_i2c.c
> > @@ -110,7 +110,7 @@ MODULE_DEVICE_TABLE(of, st_accel_of_match);
> >
> > #ifdef CONFIG_ACPI
> > static const struct acpi_device_id st_accel_acpi_match[] = {
> > - {"SMO8840", (kernel_ulong_t)LNG2DM_ACCEL_DEV_NAME},
> > + {"SMO8840", (kernel_ulong_t)LIS2DH12_ACCEL_DEV_NAME},
> > {"SMO8A90", (kernel_ulong_t)LNG2DM_ACCEL_DEV_NAME},
> > { },
> > };
> >
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-01 14:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 9:54 [PATCH] iio: st_sensors: remap SMO8840 to LIS2DH12 Wen-chien Jesse Sung
2020-02-24 19:23 ` Hans de Goede
2020-03-01 14:22 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).