Searched +hist:01 +hist:b9cb0d (Results 1 - 1 of 1) sorted by relevance

/linux-master/drivers/iio/proximity/
H A Dsx9310.cdiff caa8ce7f Sat Jan 01 01:38:14 MST 2022 Gwendal Grignou <gwendal@chromium.org> iio:proximity:sx9310: Extract common Semtech sensor logic

Before adding new Semtech sensors, move common logic to all Semtech SAR
sensor in its own file:
- interface with IIO subsystem,
- interrupt management,
- channel access conrol,
- event processing.

The change adds a bidirectional interface between sx93xx and sx_common.

The change is quite mechanical, as the impacted functions are moved
and renamed.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20220101203817.290512-3-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
diff caa8ce7f Sat Jan 01 01:38:14 MST 2022 Gwendal Grignou <gwendal@chromium.org> iio:proximity:sx9310: Extract common Semtech sensor logic

Before adding new Semtech sensors, move common logic to all Semtech SAR
sensor in its own file:
- interface with IIO subsystem,
- interrupt management,
- channel access conrol,
- event processing.

The change adds a bidirectional interface between sx93xx and sx_common.

The change is quite mechanical, as the impacted functions are moved
and renamed.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20220101203817.290512-3-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
diff fc5d805e Sat Jan 01 01:38:13 MST 2022 Gwendal Grignou <gwendal@chromium.org> iio:proximity:sx9310: Add frequency in read_avail

Instead of using IIO_DEV_ATTR_SAMP_FREQ_AVAIL sysfs attribute,
add a _FREQ case in read_avail() to display the frequency table.
No change to |sampling_frequency_available| was observed.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20220101203817.290512-2-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
diff fc5d805e Sat Jan 01 01:38:13 MST 2022 Gwendal Grignou <gwendal@chromium.org> iio:proximity:sx9310: Add frequency in read_avail

Instead of using IIO_DEV_ATTR_SAMP_FREQ_AVAIL sysfs attribute,
add a _FREQ case in read_avail() to display the frequency table.
No change to |sampling_frequency_available| was observed.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20220101203817.290512-2-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
diff b8653aff Wed Dec 02 01:02:52 MST 2020 Stephen Boyd <swboyd@chromium.org> iio: sx9310: Fix semtech,avg-pos-strength setting when > 16

This DT property can be 0, 16, and then 64, but not 32. The math here
doesn't recognize this slight bump in the power of 2 numbers and
translates a DT property of 64 into the register value '3' when it
really should be '2'. Fix it by subtracting one more if the number being
translated is larger than 31. Also use clamp() because we're here.

Cc: Daniel Campello <campello@chromium.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Gwendal Grignou <gwendal@chromium.org>
Cc: Evan Green <evgreen@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20201202200252.986230-1-swboyd@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
diff a06b63a1 Tue Dec 01 00:03:28 MST 2020 Dan Carpenter <dan.carpenter@oracle.com> iio: sx9310: Off by one in sx9310_read_thresh()

This > should be >= to prevent reading one element beyond the end of
the sx9310_pthresh_codes[] array.

Fixes: ad2b473e2ba3 ("iio: sx9310: Support setting proximity thresholds")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/X8XqwK0z//8sSWJR@mwanda
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
diff 52f5b683 Tue Sep 01 09:19:43 MDT 2020 Douglas Anderson <dianders@chromium.org> iio: sx9310: Prefer async probe

On one board I found that:
probe of 5-0028 returned 1 after 259547 usecs

While some of this time is attributable to the pile of i2c transfers
that we do at probe time, the lion's share (over 200 ms) is sitting
waiting in the polling loop in sx9310_init_compensation() waiting for
the hardware to indicate that it's done.

There's no reason to block probe of all other devices on our probe.
Turn on async probe.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Daniel Campello <campello@chromium.org>
Link: https://lore.kernel.org/r/20200901081920.v2.1.Id02b2f451b3eed71ddd580f4b8b44b3e33e84970@changeid
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
diff 01b9cb0d Mon Aug 03 17:58:06 MDT 2020 Daniel Campello <campello@chromium.org> iio: sx9310: Fixes various memory handling

Makes use __aligned(8) to ensure that the timestamp is correctly aligned
when we call io_push_to_buffers_with_timestamp().
Also makes use of sizeof() for regmap_bulk_read instead of static value.

Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
diff 01b9cb0d Mon Aug 03 17:58:06 MDT 2020 Daniel Campello <campello@chromium.org> iio: sx9310: Fixes various memory handling

Makes use __aligned(8) to ensure that the timestamp is correctly aligned
when we call io_push_to_buffers_with_timestamp().
Also makes use of sizeof() for regmap_bulk_read instead of static value.

Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Completed in 176 milliseconds