mbox series

[v14,0/4] Add Intel LJCA device driver

Message ID 1693806261-12958-1-git-send-email-wentong.wu@intel.com (mailing list archive)
Headers show
Series Add Intel LJCA device driver | expand

Message

Wu, Wentong Sept. 4, 2023, 5:44 a.m. UTC
Add driver for Intel La Jolla Cove Adapter (LJCA) device. This
IO-expander expands additional functions to the host system
such as GPIO, I2C and SPI with USB host interface. We add 4
drivers to support this device: a USB driver, a GPIO chip driver,
a I2C controller driver and a SPI controller driver.

---
v14:
 - fix build error: implicit declaration of function 'acpi_dev_clear_dependencies'

v13:
 - make ljca-usb more robust with the help of Hans de Goede
 - call acpi_dev_clear_dependencies() to mark _DEP ACPI dependencies on the I2C controller as satisfied, and patch is from Hans de Goede

v12:
 - switch dev_err to dev_dbg for i2c-ljca driver
 - avoid err printing because of calling usb_kill_urb when attempts to resubmit the rx urb

v11:
 - switch dev_err to dev_dbg for i2c-ljca driver
 - remove message length check because of defined quirk structure
 - remove I2C_FUNC_SMBUS_EMUL support

v10:
 - remove ljca_i2c_format_slave_addr
 - remove memset before write write w_packet
 - make ljca_i2c_stop void and print err message in case failure
 - use dev_err_probe in ljca_i2c_probe function

v9:
 - overhaul usb-ljca driver to make it more structured and easy understand
 - fix memory leak issue for usb-ljca driver
 - add spinlock to protect tx_buf and ex_buf
 - change exported APIs for usb-ljca driver
 - unify prefix for structures and functions for i2c-ljca driver
 - unify prefix for structures and functions for spi-ljca driver
 - unify prefix for structures and functions for gpio-ljca driver
 - update gpio-ljca, i2c-ljca and spi-ljca drivers according to usb-ljca's changes

Wentong Wu (4):
  usb: Add support for Intel LJCA device
  i2c: Add support for Intel LJCA USB I2C driver
  spi: Add support for Intel LJCA USB SPI driver
  gpio: update Intel LJCA USB GPIO driver

 drivers/gpio/Kconfig          |   4 +-
 drivers/gpio/gpio-ljca.c      | 246 +++++++------
 drivers/i2c/busses/Kconfig    |  11 +
 drivers/i2c/busses/Makefile   |   1 +
 drivers/i2c/busses/i2c-ljca.c | 334 +++++++++++++++++
 drivers/spi/Kconfig           |  11 +
 drivers/spi/Makefile          |   1 +
 drivers/spi/spi-ljca.c        | 297 +++++++++++++++
 drivers/usb/misc/Kconfig      |  14 +
 drivers/usb/misc/Makefile     |   1 +
 drivers/usb/misc/usb-ljca.c   | 834 ++++++++++++++++++++++++++++++++++++++++++
 include/linux/usb/ljca.h      | 113 ++++++
 12 files changed, 1762 insertions(+), 105 deletions(-)
 create mode 100644 drivers/i2c/busses/i2c-ljca.c
 create mode 100644 drivers/spi/spi-ljca.c
 create mode 100644 drivers/usb/misc/usb-ljca.c
 create mode 100644 include/linux/usb/ljca.h

Comments

Bartosz Golaszewski Sept. 4, 2023, 7:38 a.m. UTC | #1
On Mon, Sep 4, 2023 at 7:44 AM Wentong Wu <wentong.wu@intel.com> wrote:
>
> Add driver for Intel La Jolla Cove Adapter (LJCA) device. This
> IO-expander expands additional functions to the host system
> such as GPIO, I2C and SPI with USB host interface. We add 4
> drivers to support this device: a USB driver, a GPIO chip driver,
> a I2C controller driver and a SPI controller driver.
>

Please stop spamming the list with resends. Give reviewers at least a
couple days to respond.

Bartosz
Hans de Goede Sept. 4, 2023, 7:44 a.m. UTC | #2
Hi,

On 9/4/23 07:44, Wentong Wu wrote:
> Add driver for Intel La Jolla Cove Adapter (LJCA) device. This
> IO-expander expands additional functions to the host system
> such as GPIO, I2C and SPI with USB host interface. We add 4
> drivers to support this device: a USB driver, a GPIO chip driver,
> a I2C controller driver and a SPI controller driver.
> 
> ---
> v14:
>  - fix build error: implicit declaration of function 'acpi_dev_clear_dependencies'
> 
> v13:
>  - make ljca-usb more robust with the help of Hans de Goede
>  - call acpi_dev_clear_dependencies() to mark _DEP ACPI dependencies on the I2C controller as satisfied, and patch is from Hans de Goede

Thank you I can confirm that v14 works well on my ThinkPad x1 yoga gen 8:

Tested-by: Hans de Goede <hdegoede@redhat.com>

Note I still have one small remark for patch 1/4, I'll reply to
the patch itself with the remark.

Regards,

Hans

> 
> v12:
>  - switch dev_err to dev_dbg for i2c-ljca driver
>  - avoid err printing because of calling usb_kill_urb when attempts to resubmit the rx urb
> 
> v11:
>  - switch dev_err to dev_dbg for i2c-ljca driver
>  - remove message length check because of defined quirk structure
>  - remove I2C_FUNC_SMBUS_EMUL support
> 
> v10:
>  - remove ljca_i2c_format_slave_addr
>  - remove memset before write write w_packet
>  - make ljca_i2c_stop void and print err message in case failure
>  - use dev_err_probe in ljca_i2c_probe function
> 
> v9:
>  - overhaul usb-ljca driver to make it more structured and easy understand
>  - fix memory leak issue for usb-ljca driver
>  - add spinlock to protect tx_buf and ex_buf
>  - change exported APIs for usb-ljca driver
>  - unify prefix for structures and functions for i2c-ljca driver
>  - unify prefix for structures and functions for spi-ljca driver
>  - unify prefix for structures and functions for gpio-ljca driver
>  - update gpio-ljca, i2c-ljca and spi-ljca drivers according to usb-ljca's changes
> 
> Wentong Wu (4):
>   usb: Add support for Intel LJCA device
>   i2c: Add support for Intel LJCA USB I2C driver
>   spi: Add support for Intel LJCA USB SPI driver
>   gpio: update Intel LJCA USB GPIO driver
> 
>  drivers/gpio/Kconfig          |   4 +-
>  drivers/gpio/gpio-ljca.c      | 246 +++++++------
>  drivers/i2c/busses/Kconfig    |  11 +
>  drivers/i2c/busses/Makefile   |   1 +
>  drivers/i2c/busses/i2c-ljca.c | 334 +++++++++++++++++
>  drivers/spi/Kconfig           |  11 +
>  drivers/spi/Makefile          |   1 +
>  drivers/spi/spi-ljca.c        | 297 +++++++++++++++
>  drivers/usb/misc/Kconfig      |  14 +
>  drivers/usb/misc/Makefile     |   1 +
>  drivers/usb/misc/usb-ljca.c   | 834 ++++++++++++++++++++++++++++++++++++++++++
>  include/linux/usb/ljca.h      | 113 ++++++
>  12 files changed, 1762 insertions(+), 105 deletions(-)
>  create mode 100644 drivers/i2c/busses/i2c-ljca.c
>  create mode 100644 drivers/spi/spi-ljca.c
>  create mode 100644 drivers/usb/misc/usb-ljca.c
>  create mode 100644 include/linux/usb/ljca.h
>
Wu, Wentong Sept. 4, 2023, 7:56 a.m. UTC | #3
> From: Hans de Goede <hdegoede@redhat.com>
> 
> Hi,
> 
> On 9/4/23 07:44, Wentong Wu wrote:
> > Add driver for Intel La Jolla Cove Adapter (LJCA) device. This
> > IO-expander expands additional functions to the host system such as
> > GPIO, I2C and SPI with USB host interface. We add 4 drivers to support
> > this device: a USB driver, a GPIO chip driver, a I2C controller driver
> > and a SPI controller driver.
> >
> > ---
> > v14:
> >  - fix build error: implicit declaration of function
> 'acpi_dev_clear_dependencies'
> >
> > v13:
> >  - make ljca-usb more robust with the help of Hans de Goede
> >  - call acpi_dev_clear_dependencies() to mark _DEP ACPI dependencies
> > on the I2C controller as satisfied, and patch is from Hans de Goede
> 
> Thank you I can confirm that v14 works well on my ThinkPad x1 yoga gen 8:
> 
> Tested-by: Hans de Goede <hdegoede@redhat.com>

Thanks, v14 also works well on my setup(RPL platform).

BR,
Wentong
> 
> Note I still have one small remark for patch 1/4, I'll reply to the patch itself with
> the remark.
> 
> Regards,
> 
> Hans
> 
> >
> > v12:
> >  - switch dev_err to dev_dbg for i2c-ljca driver
> >  - avoid err printing because of calling usb_kill_urb when attempts to
> > resubmit the rx urb
> >
> > v11:
> >  - switch dev_err to dev_dbg for i2c-ljca driver
> >  - remove message length check because of defined quirk structure
> >  - remove I2C_FUNC_SMBUS_EMUL support
> >
> > v10:
> >  - remove ljca_i2c_format_slave_addr
> >  - remove memset before write write w_packet
> >  - make ljca_i2c_stop void and print err message in case failure
> >  - use dev_err_probe in ljca_i2c_probe function
> >
> > v9:
> >  - overhaul usb-ljca driver to make it more structured and easy
> > understand
> >  - fix memory leak issue for usb-ljca driver
> >  - add spinlock to protect tx_buf and ex_buf
> >  - change exported APIs for usb-ljca driver
> >  - unify prefix for structures and functions for i2c-ljca driver
> >  - unify prefix for structures and functions for spi-ljca driver
> >  - unify prefix for structures and functions for gpio-ljca driver
> >  - update gpio-ljca, i2c-ljca and spi-ljca drivers according to
> > usb-ljca's changes
> >
> > Wentong Wu (4):
> >   usb: Add support for Intel LJCA device
> >   i2c: Add support for Intel LJCA USB I2C driver
> >   spi: Add support for Intel LJCA USB SPI driver
> >   gpio: update Intel LJCA USB GPIO driver
> >
> >  drivers/gpio/Kconfig          |   4 +-
> >  drivers/gpio/gpio-ljca.c      | 246 +++++++------
> >  drivers/i2c/busses/Kconfig    |  11 +
> >  drivers/i2c/busses/Makefile   |   1 +
> >  drivers/i2c/busses/i2c-ljca.c | 334 +++++++++++++++++
> >  drivers/spi/Kconfig           |  11 +
> >  drivers/spi/Makefile          |   1 +
> >  drivers/spi/spi-ljca.c        | 297 +++++++++++++++
> >  drivers/usb/misc/Kconfig      |  14 +
> >  drivers/usb/misc/Makefile     |   1 +
> >  drivers/usb/misc/usb-ljca.c   | 834
> ++++++++++++++++++++++++++++++++++++++++++
> >  include/linux/usb/ljca.h      | 113 ++++++
> >  12 files changed, 1762 insertions(+), 105 deletions(-)  create mode
> > 100644 drivers/i2c/busses/i2c-ljca.c  create mode 100644
> > drivers/spi/spi-ljca.c  create mode 100644 drivers/usb/misc/usb-ljca.c
> > create mode 100644 include/linux/usb/ljca.h
Wu, Wentong Sept. 4, 2023, 8:25 a.m. UTC | #4
> From: Bartosz Golaszewski <brgl@bgdev.pl>
> 
> On Mon, Sep 4, 2023 at 7:44 AM Wentong Wu <wentong.wu@intel.com> wrote:
> >
> > Add driver for Intel La Jolla Cove Adapter (LJCA) device. This
> > IO-expander expands additional functions to the host system such as
> > GPIO, I2C and SPI with USB host interface. We add 4 drivers to support
> > this device: a USB driver, a GPIO chip driver, a I2C controller driver
> > and a SPI controller driver.
> >
> 
> Please stop spamming the list with resends. Give reviewers at least a couple days
> to respond.

Understood, thanks

BR,
Wentong
> 
> Bartosz