Skip to contentSkip to conversation

LP3943 MFD driver for a GPIO expander and a PWM generator

PATCH Superseded Milo Kim 4 participants 5 messages Sep 12, 2013 – Sep 20, 2013 PWM

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Milo Kim

author
#0 lore raw

v3 cover LP3943 MFD driver for a GPIO expander and a PWM generator

LP3943 is an integrated device capable of driving 16 output channels. It can be used for GPIO expander and PWM generators. LP3493 registers are controlled via the I2C interface.

This patch-set consists of four parts - MFD, GPIO, PWM and documents.

Major updates in v3:

* MFD
Lee Jones pointed confusing pin number notation.
Now, each output pin number is exactly matched to each enum value.

LP3943 has a static configuration from platform data or the device tree, So, I keep the driver structure instead of using the pin control subsystem.
(https://lkml.org/lkml/2013/8/14/490)

* PWM
Do not emulate 'set_polarity' function in case of unsupported feature by the chip.
Code fixes based on Thierry Reding's comments.
(https://lkml.org/lkml/2013/8/14/188)

* Documentation
From Thierry's suggestion, detailed driver description was moved to 'Documentation/lp3943.txt'.
Fix device tree bindings from maintainers' comments.
(https://lkml.org/lkml/2013/7/31/226)
(https://lkml.org/lkml/2013/8/14/569)

Milo Kim (4):
mfd: add LP3943 MFD driver
gpio: add LP3943 I2C GPIO expander driver
pwm: add LP3943 PWM driver
Documentation: add LP3943 DT bindings and document

 Documentation/00-INDEX                             |    2 +
 .../devicetree/bindings/gpio/gpio-lp3943.txt       |   37 +++
 Documentation/devicetree/bindings/mfd/lp3943.txt   |   33 ++
 .../devicetree/bindings/pwm/pwm-lp3943.txt         |   58 ++++
 Documentation/lp3943.txt                           |   62 ++++
 drivers/gpio/Kconfig                               |    8 +
 drivers/gpio/Makefile                              |    1 +
 drivers/gpio/gpio-lp3943.c                         |  242 +++++++++++++++
 drivers/mfd/Kconfig                                |   11 +
 drivers/mfd/Makefile                               |    1 +
 drivers/mfd/lp3943.c                               |  148 +++++++++
 drivers/pwm/Kconfig                                |   10 +
 drivers/pwm/Makefile                               |    1 +
 drivers/pwm/pwm-lp3943.c                           |  314 ++++++++++++++++++++
 include/linux/mfd/lp3943.h                         |  114 +++++++
 15 files changed, 1042 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-lp3943.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/lp3943.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/pwm-lp3943.txt
 create mode 100644 Documentation/lp3943.txt
 create mode 100644 drivers/gpio/gpio-lp3943.c
 create mode 100644 drivers/mfd/lp3943.c
 create mode 100644 drivers/pwm/pwm-lp3943.c
 create mode 100644 include/linux/mfd/lp3943.h
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 3 lines

* Documentation
From Thierry's suggestion, detailed driver description was moved to 'Documentation/lp3943.txt'.

Really? Why here? Do we really want 1000's of driver docs in /Documentation?

No other driver does this (intel gained from a glancing look).

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#2 lore raw
Quoted 7 lines · Lee Jones
Quoted 3 lines

* Documentation
From Thierry's suggestion, detailed driver description was moved to 'Documentation/lp3943.txt'.

Really? Why here? Do we really want 1000's of driver docs in /Documentation?

No other driver does this (intel gained from a glancing look).

Well, perhaps the top-level Documentation directory isn't optimal, but I think it's a lot better than the commit description. Perhaps an 'mfd' subdirectory could be created where documentation such as this could be put.

Thierry

author
#3 lore raw

Hi Lee,

Quoted 6 lines · Thierry Reding
Quoted 5 lines · Lee Jones
Quoted 3 lines

* Documentation
From Thierry's suggestion, detailed driver description was moved to 'Documentation/lp3943.txt'.

Really? Why here? Do we really want 1000's of driver docs in /Documentation?

There is no subdirectory for GPIO and PWM documents under 'Documentation'. That's why I put LP3943 documentation here.

Quoted 1 line
Quoted 1 line

No other driver does this (intel gained from a glancing look).

I thought it's no issue because I still found few driver documentations in that location. It sounds like people are moving those into other subdirectories.
Thanks for this information.

Quoted 4 lines

Well, perhaps the top-level Documentation directory isn't optimal, but I think it's a lot better than the commit description. Perhaps an 'mfd' subdirectory could be created where documentation such as this could be put.

I agree Thierry.
If you don't mind, can I create a MFD subdirectory with this patch-set in next version, v4? Any other ideas are welcome.

Best regards,
Milo

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 3 lines · Milo Kim

I agree Thierry.
If you don't mind, can I create a MFD subdirectory with this patch-set in next version, v4?

This seems like a good idea.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html