mbox series

[v5,0/7] Add support for Azoteq IQS620A/621/622/624/625

Message ID 1581895931-6056-1-git-send-email-jeff@labundy.com
Headers show
Series Add support for Azoteq IQS620A/621/622/624/625 | expand

Message

Jeff LaBundy Feb. 16, 2020, 11:32 p.m. UTC
This series adds support for the Azoteq IQS620A, IQS621, IQS622, IQS624 and
IQS625 multi-function sensors. Each device integrates numerous sensing tech-
nologies in a single package.

A multi-function device (MFD) driver supports core functions common to all
devices, including device identification, firmware, interrupt handling and
runtime power management. The MFD driver is also responsible for adding all
product-specific sub-devices.

Each device supports self-capacitive, Hall-effect, and (in some cases) mutual-
inductive sensing. These functions represent keys or switches and are supported
by an input driver that covers all five devices. An assortment of pwm and iio
drivers supports device-specific functions including ambient light and angular
position sensing.

This series was tested using the following development hardware: IQS620AEV04,
IQS621EV04, IQS622EV04 and IQS624/5EV04. A demonstration of the series can be
seen at the following link: https://youtu.be/7hJZPeFT0aY

Jeff LaBundy (7):
  dt-bindings: Add bindings for Azoteq IQS620A/621/622/624/625
  mfd: Add support for Azoteq IQS620A/621/622/624/625
  input: keyboard: Add support for Azoteq IQS620A/621/622/624/625
  pwm: Add support for Azoteq IQS620A PWM generator
  iio: temperature: Add support for Azoteq IQS620AT temperature sensor
  iio: light: Add support for Azoteq IQS621/622 ambient light sensors
  iio: position: Add support for Azoteq IQS624/625 angle sensors

 .../devicetree/bindings/input/iqs62x-keys.yaml     |  132 +++
 Documentation/devicetree/bindings/mfd/iqs62x.yaml  |  179 ++++
 .../devicetree/bindings/pwm/iqs620a-pwm.yaml       |   32 +
 drivers/iio/Kconfig                                |    1 +
 drivers/iio/Makefile                               |    1 +
 drivers/iio/light/Kconfig                          |   10 +
 drivers/iio/light/Makefile                         |    1 +
 drivers/iio/light/iqs621-als.c                     |  617 ++++++++++++
 drivers/iio/position/Kconfig                       |   19 +
 drivers/iio/position/Makefile                      |    7 +
 drivers/iio/position/iqs624-pos.c                  |  284 ++++++
 drivers/iio/temperature/Kconfig                    |   10 +
 drivers/iio/temperature/Makefile                   |    1 +
 drivers/iio/temperature/iqs620at-temp.c            |   97 ++
 drivers/input/keyboard/Kconfig                     |   10 +
 drivers/input/keyboard/Makefile                    |    1 +
 drivers/input/keyboard/iqs62x-keys.c               |  335 ++++++
 drivers/mfd/Kconfig                                |   13 +
 drivers/mfd/Makefile                               |    1 +
 drivers/mfd/iqs62x.c                               | 1063 ++++++++++++++++++++
 drivers/pwm/Kconfig                                |   10 +
 drivers/pwm/Makefile                               |    1 +
 drivers/pwm/pwm-iqs620a.c                          |  270 +++++
 include/linux/mfd/iqs62x.h                         |  139 +++
 24 files changed, 3234 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/iqs62x-keys.yaml
 create mode 100644 Documentation/devicetree/bindings/mfd/iqs62x.yaml
 create mode 100644 Documentation/devicetree/bindings/pwm/iqs620a-pwm.yaml
 create mode 100644 drivers/iio/light/iqs621-als.c
 create mode 100644 drivers/iio/position/Kconfig
 create mode 100644 drivers/iio/position/Makefile
 create mode 100644 drivers/iio/position/iqs624-pos.c
 create mode 100644 drivers/iio/temperature/iqs620at-temp.c
 create mode 100644 drivers/input/keyboard/iqs62x-keys.c
 create mode 100644 drivers/mfd/iqs62x.c
 create mode 100644 drivers/pwm/pwm-iqs620a.c
 create mode 100644 include/linux/mfd/iqs62x.h

--
2.7.4

Comments

Lee Jones Feb. 24, 2020, 11:14 a.m. UTC | #1
On Sun, 16 Feb 2020, Jeff LaBundy wrote:

> This patch adds core support for the Azoteq IQS620A, IQS621, IQS622,
> IQS624 and IQS625 multi-function sensors.
> 
> Signed-off-by: Jeff LaBundy <jeff@labundy.com>
> ---
> Changes in v5:
>   - Merged iqs62x-core.c and iqs62x-tables.c into a single iqs62x.c
>   - Corrected spelling of "data sheet" to "datasheet"
>   - Added one line of whitespace in various places to improve readability
>   - Replaced iqs62x->map with iqs62x->regmap throughout
>   - Added the prox_settings member to the iqs62x_dev_desc struct and eliminated
>     the ternary operator in iqs62x_dev_init to determine SAR UI enable register
>     address
>   - Added a comment in iqs62x_dev_init to explain the background for the bounds
>     checking done on the IQS624/625 interval divider
>   - Added #defines for the delays used within iqs62x_dev_init
>   - Renamed iqs62x_fw_prs and iqs62x_fw_cb to iqs62x_firmware_parse and
>     iqs62x_firmware_load, respectively
>   - Updated the call to devm_mfd_add_devices to use PLATFORM_DEVID_NONE instead
>     of -1 and printed "sub-devices" instead of "devices" in the error message
>   - Dropped #defines for mfd_cell names in favor of the actual string names and
>     collapsed mfd_cells with no other members into one line
>   - Demoted iqs62x_devs to a static array as it is not used by any sub-devices
>   - Removed unnecessary { IQS620A_DEV, ... } enum and IQS62X_NUM_DEV #define
>   - Removed the soft reset and associated delay in iqs62x_probe to preserve any
>     PWM-related changes made by a bootloader
>   - Updated the comments in iqs62x_probe to highlight the significance of blank
>     calibration registers and why the outer loop may be exited early
>   - Made the first call to regmap_update_bits in iqs62x_suspend consistent with
>     other instances in the series that set a single bit by passing all ones for
>     the value instead of the mask
> 
> Changes in v4:
>   - None
> 
> Changes in v3:
>   - None
> 
> Changes in v2:
>   - Merged 'Copyright' and 'Author' lines into one in introductory comments
>   - Replaced 'error' with 'ret' throughout
>   - Updated iqs62x_dev_init to account for 4/8/16-MHz clock divider in start-up
>     delays and replaced ATI timeout routine with regmap_read_poll_timeout
>   - Added an error message to iqs62x_irq in case device status fails to be read
>   - Replaced sw_num member of iqs62x_core with a local variable in iqs62x_probe
>     as the former was unused anywhere else
>   - Added comments throughout iqs62x_probe to clarify how devices are matched
>     based on the presence of calibration data
>   - Inverted the product and software number comparison logic in iqs62x_probe
>     to avoid an else...continue branch
>   - Changed iqs62x_probe from .probe callback to .probe_new callback, thereby
>     eliminating the otherwise unused iqs62x_id array
>   - Moved iqs62x_suspend and iqs62x_resume below iqs62x_remove
>   - Eliminated tabbed alignment of regmap_config and i2c_driver struct members
>   - Added register definitions for register addresses used in iqs621_cal_regs,
>     iqs620at_cal_regs and iqs62x_devs arrays
>   - Removed of_compatible string from IQS622 mfd_cell struct as its proximity
>     (now ambient light) sensing functionality need not be represented using a
>     child node
>   - Dissolved union in iqs62x_event_data to allow simultaneous use of ir_flags
>     and als_flags
>   - Removed temp_flags member of iqs62x_event_data, IQS62X_EVENT_TEMP register
>     enumeration and IQS62X_EVENT_UI_HI/LO from iqs620a_event_regs (thereby re-
>     ducing IQS62X_EVENT_SIZE to 10) as they were unused
> 
>  drivers/mfd/Kconfig        |   13 +
>  drivers/mfd/Makefile       |    1 +
>  drivers/mfd/iqs62x.c       | 1063 ++++++++++++++++++++++++++++++++++++++++++++
>  include/linux/mfd/iqs62x.h |  139 ++++++
>  4 files changed, 1216 insertions(+)
>  create mode 100644 drivers/mfd/iqs62x.c
>  create mode 100644 include/linux/mfd/iqs62x.h

Well done Jeff.  Good job.

Applied, thanks.
Jeff LaBundy Feb. 28, 2020, 3:42 a.m. UTC | #2
Hi Lee,

On Mon, Feb 24, 2020 at 11:14:48AM +0000, Lee Jones wrote:

[...]

> 
> Well done Jeff.  Good job.
> 
> Applied, thanks.
> 
> -- 
> Lee Jones [李琼斯]
> Linaro Services Technical Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog

Thank you for your kind words as well as your support in fleshing out this
series.

Just to confirm, does your offer to take the remainder (once everything is
approved) through immutable branches still stand?

Hi Uwe and/or Thierry,

Please let me know if you have any additional input on patch [4/7], or you
feel it is suitable for your Ack at this stage.

Kind regards,
Jeff LaBundy
Uwe Kleine-König Feb. 28, 2020, 9:22 a.m. UTC | #3
Hello Jeff,

On Sun, Feb 16, 2020 at 05:32:08PM -0600, Jeff LaBundy wrote:
> This patch adds support for the Azoteq IQS620A, capable of generating
> a 1-kHz PWM output with duty cycle between ~0.4% and 100% (inclusive).
> 
> Signed-off-by: Jeff LaBundy <jeff@labundy.com>

I like it,

Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Best regards
Uwe
Lee Jones March 2, 2020, 12:04 p.m. UTC | #4
On Thu, 27 Feb 2020, Jeff LaBundy wrote:

> Hi Lee,
> 
> On Mon, Feb 24, 2020 at 11:14:48AM +0000, Lee Jones wrote:
> 
> [...]
> 
> > 
> > Well done Jeff.  Good job.
> > 
> > Applied, thanks.
> > 
> 
> Thank you for your kind words as well as your support in fleshing out this
> series.
> 
> Just to confirm, does your offer to take the remainder (once everything is
> approved) through immutable branches still stand?

Depends how quickly you can get the other drivers turned around.
Jeff LaBundy March 2, 2020, 2:11 p.m. UTC | #5
Hi Lee,

On Mon, Mar 02, 2020 at 12:04:58PM +0000, Lee Jones wrote:
> On Thu, 27 Feb 2020, Jeff LaBundy wrote:
> 
> > Hi Lee,
> > 
> > On Mon, Feb 24, 2020 at 11:14:48AM +0000, Lee Jones wrote:
> > 
> > [...]
> > 
> > > 
> > > Well done Jeff.  Good job.
> > > 
> > > Applied, thanks.
> > > 
> > 
> > Thank you for your kind words as well as your support in fleshing out this
> > series.
> > 
> > Just to confirm, does your offer to take the remainder (once everything is
> > approved) through immutable branches still stand?
> 
> Depends how quickly you can get the other drivers turned around.

With Uwe's approval from Friday, all five drivers are complete. Dmitry and
Jonathan's approvals were given in previous review cycles and were carried
forward with their permission. If anything else is required, please let me
know.

> 
> -- 
> Lee Jones [李琼斯]
> Linaro Services Technical Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog

Kind regards,
Jeff LaBundy
Uwe Kleine-König March 2, 2020, 2:23 p.m. UTC | #6
Hello,

On Mon, Mar 02, 2020 at 08:11:17AM -0600, Jeff LaBundy wrote:
> On Mon, Mar 02, 2020 at 12:04:58PM +0000, Lee Jones wrote:
> > On Thu, 27 Feb 2020, Jeff LaBundy wrote:
> > 
> > > Hi Lee,
> > > 
> > > On Mon, Feb 24, 2020 at 11:14:48AM +0000, Lee Jones wrote:
> > > 
> > > [...]
> > > 
> > > > 
> > > > Well done Jeff.  Good job.
> > > > 
> > > > Applied, thanks.
> > > > 
> > > 
> > > Thank you for your kind words as well as your support in fleshing out this
> > > series.
> > > 
> > > Just to confirm, does your offer to take the remainder (once everything is
> > > approved) through immutable branches still stand?
> > 
> > Depends how quickly you can get the other drivers turned around.
> 
> With Uwe's approval from Friday, all five drivers are complete.

Note that I'm "only" reviewer of the PWM stuff and Thierry is the one
responsible for the pwm-tree. So you need his ack to take the pwm patch
through a different tree.

Best regards
Uwe
Lee Jones March 2, 2020, 2:24 p.m. UTC | #7
On Mon, 02 Mar 2020, Jeff LaBundy wrote:

> Hi Lee,
> 
> On Mon, Mar 02, 2020 at 12:04:58PM +0000, Lee Jones wrote:
> > On Thu, 27 Feb 2020, Jeff LaBundy wrote:
> > 
> > > Hi Lee,
> > > 
> > > On Mon, Feb 24, 2020 at 11:14:48AM +0000, Lee Jones wrote:
> > > 
> > > [...]
> > > 
> > > > 
> > > > Well done Jeff.  Good job.
> > > > 
> > > > Applied, thanks.
> > > > 
> > > 
> > > Thank you for your kind words as well as your support in fleshing out this
> > > series.
> > > 
> > > Just to confirm, does your offer to take the remainder (once everything is
> > > approved) through immutable branches still stand?
> > 
> > Depends how quickly you can get the other drivers turned around.
> 
> With Uwe's approval from Friday, all five drivers are complete. Dmitry and
> Jonathan's approvals were given in previous review cycles and were carried
> forward with their permission. If anything else is required, please let me
> know.

Does Uwe's review mean that Thierry's is not required?
Jeff LaBundy March 9, 2020, 12:42 a.m. UTC | #8
Hi Thierry,

May I ask for your Ack as well, so that this patch can go through MFD
along with the remainder of the series?

Hi Uwe,

On Fri, Feb 28, 2020 at 10:22:34AM +0100, Uwe Kleine-König wrote:
> Hello Jeff,
> 
> On Sun, Feb 16, 2020 at 05:32:08PM -0600, Jeff LaBundy wrote:
> > This patch adds support for the Azoteq IQS620A, capable of generating
> > a 1-kHz PWM output with duty cycle between ~0.4% and 100% (inclusive).
> > 
> > Signed-off-by: Jeff LaBundy <jeff@labundy.com>
> 
> I like it,
> 
> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thank you very much for your steadfast support during the development
of this patch over the last few months.

> 
> Best regards
> Uwe
> 
> -- 
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Kind regards,
Jeff LaBundy
Jeff LaBundy March 23, 2020, 2:16 a.m. UTC | #9
Hi Lee,

On Mon, Mar 02, 2020 at 02:24:05PM +0000, Lee Jones wrote:
> On Mon, 02 Mar 2020, Jeff LaBundy wrote:
> 
> > Hi Lee,
> > 
> > On Mon, Mar 02, 2020 at 12:04:58PM +0000, Lee Jones wrote:
> > > On Thu, 27 Feb 2020, Jeff LaBundy wrote:
> > > 
> > > > Hi Lee,
> > > > 
> > > > On Mon, Feb 24, 2020 at 11:14:48AM +0000, Lee Jones wrote:
> > > > 
> > > > [...]
> > > > 
> > > > > 
> > > > > Well done Jeff.  Good job.
> > > > > 
> > > > > Applied, thanks.
> > > > > 
> > > > 
> > > > Thank you for your kind words as well as your support in fleshing out this
> > > > series.
> > > > 
> > > > Just to confirm, does your offer to take the remainder (once everything is
> > > > approved) through immutable branches still stand?
> > > 
> > > Depends how quickly you can get the other drivers turned around.
> > 
> > With Uwe's approval from Friday, all five drivers are complete. Dmitry and
> > Jonathan's approvals were given in previous review cycles and were carried
> > forward with their permission. If anything else is required, please let me
> > know.
> 
> Does Uwe's review mean that Thierry's is not required?

Sorry about that; I was jumping the gun (thank you Uwe for clarifying).
The pwm patch still needs an Ack from Thierry before it can be applied.

I have not received any feedback from Thierry throughout this patch set,
and I'd like to unblock the remainder if possible. In case Thierry does
not respond by the time you elect to send your next pull request, would
you be willing to drop the pwm patch and take the input and iio patches
through your tree?

If so, I'll re-send the pwm patch on its own to Thierry during a future
cycle so that he can take it through his tree at his convenience.

> 
> -- 
> Lee Jones [李琼斯]
> Linaro Services Technical Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog

Kind regards,
Jeff LaBundy
Lee Jones March 24, 2020, 8:16 a.m. UTC | #10
On Sun, 22 Mar 2020, Jeff LaBundy wrote:

> Hi Lee,
> 
> On Mon, Mar 02, 2020 at 02:24:05PM +0000, Lee Jones wrote:
> > On Mon, 02 Mar 2020, Jeff LaBundy wrote:
> > 
> > > Hi Lee,
> > > 
> > > On Mon, Mar 02, 2020 at 12:04:58PM +0000, Lee Jones wrote:
> > > > On Thu, 27 Feb 2020, Jeff LaBundy wrote:
> > > > 
> > > > > Hi Lee,
> > > > > 
> > > > > On Mon, Feb 24, 2020 at 11:14:48AM +0000, Lee Jones wrote:
> > > > > 
> > > > > [...]
> > > > > 
> > > > > > 
> > > > > > Well done Jeff.  Good job.
> > > > > > 
> > > > > > Applied, thanks.
> > > > > > 
> > > > > 
> > > > > Thank you for your kind words as well as your support in fleshing out this
> > > > > series.
> > > > > 
> > > > > Just to confirm, does your offer to take the remainder (once everything is
> > > > > approved) through immutable branches still stand?
> > > > 
> > > > Depends how quickly you can get the other drivers turned around.
> > > 
> > > With Uwe's approval from Friday, all five drivers are complete. Dmitry and
> > > Jonathan's approvals were given in previous review cycles and were carried
> > > forward with their permission. If anything else is required, please let me
> > > know.
> > 
> > Does Uwe's review mean that Thierry's is not required?
> 
> Sorry about that; I was jumping the gun (thank you Uwe for clarifying).
> The pwm patch still needs an Ack from Thierry before it can be applied.
> 
> I have not received any feedback from Thierry throughout this patch set,
> and I'd like to unblock the remainder if possible. In case Thierry does
> not respond by the time you elect to send your next pull request, would
> you be willing to drop the pwm patch and take the input and iio patches
> through your tree?
> 
> If so, I'll re-send the pwm patch on its own to Thierry during a future
> cycle so that he can take it through his tree at his convenience.

Hopefully we hear fro Thierry.

If not, yes I can apply the set without the PWM patch.