Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1582728 > unrolled thread
| Started by | Richard Fitzgerald <rf@opensource.wolfsonmicro.com> |
|---|---|
| First post | 2017-02-16 18:40 +0100 |
| Last post | 2017-02-27 17:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] input: arizona-haptics - Add device property for HAP_ACT Richard Fitzgerald <rf@opensource.wolfsonmicro.com> - 2017-02-16 18:40 +0100
Re: [PATCH] input: arizona-haptics - Add device property for HAP_ACT Rob Herring <robh@kernel.org> - 2017-02-27 17:50 +0100
| From | Richard Fitzgerald <rf@opensource.wolfsonmicro.com> |
|---|---|
| Date | 2017-02-16 18:40 +0100 |
| Subject | [PATCH] input: arizona-haptics - Add device property for HAP_ACT |
| Message-ID | <tbyc9-19O-3@gated-at.bofh.it> |
This adds a device property for setting the configuration for the
HAP_ACT register field so that the connected actuator type can be
configured on systems that are not using pdata.
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
Documentation/devicetree/bindings/input/arizona-haptics.txt | 10 ++++++++++
MAINTAINERS | 1 +
drivers/input/misc/arizona-haptics.c | 7 +++++++
3 files changed, 18 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/arizona-haptics.txt
diff --git a/Documentation/devicetree/bindings/input/arizona-haptics.txt b/Documentation/devicetree/bindings/input/arizona-haptics.txt
new file mode 100644
index 0000000..a3e767b
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/arizona-haptics.txt
@@ -0,0 +1,10 @@
+Cirrus Logic Arizona class audio SoCs
+
+This document lists haptics bindings for these codecs.
+Also see the primary binding document:
+ ../mfd/arizona.txt
+
+Optional properties:
+ - wlf,hap-act : Single value defining the actuator type, as per the HAP_ACT
+ register field. See the codec datasheet for the available HAP_ACT values
+ and their meaning.
diff --git a/MAINTAINERS b/MAINTAINERS
index 26edd83..be4ea3e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13377,6 +13377,7 @@ W: https://github.com/CirrusLogic/linux-drivers/wiki
S: Supported
F: Documentation/hwmon/wm83??
F: Documentation/devicetree/bindings/extcon/extcon-arizona.txt
+F: Documentation/devicetree/bindings/input/arizona*.txt
F: Documentation/devicetree/bindings/regulator/arizona-regulator.txt
F: Documentation/devicetree/bindings/mfd/arizona.txt
F: arch/arm/mach-s3c64xx/mach-crag6410*
diff --git a/drivers/input/misc/arizona-haptics.c b/drivers/input/misc/arizona-haptics.c
index 21dc1b8..0264d95 100644
--- a/drivers/input/misc/arizona-haptics.c
+++ b/drivers/input/misc/arizona-haptics.c
@@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#include <linux/input.h>
#include <linux/slab.h>
+#include <linux/property.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
@@ -164,6 +165,12 @@ static int arizona_haptics_probe(struct platform_device *pdev)
haptics->arizona = arizona;
+ if (!dev_get_platdata(arizona->dev))
+ device_property_read_u32(arizona->dev, "wlf,hap-act",
+ &arizona->pdata.hap_act);
+
+ dev_dbg(arizona->dev, "hap_act=%u\n", arizona->pdata.hap_act);
+
ret = regmap_update_bits(arizona->regmap, ARIZONA_HAPTICS_CONTROL_1,
ARIZONA_HAP_ACT, arizona->pdata.hap_act);
if (ret != 0) {
--
1.9.1
[toc] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2017-02-27 17:50 +0100 |
| Message-ID | <tfwEO-8dT-23@gated-at.bofh.it> |
| In reply to | #1582728 |
On Thu, Feb 16, 2017 at 05:35:58PM +0000, Richard Fitzgerald wrote: > This adds a device property for setting the configuration for the > HAP_ACT register field so that the connected actuator type can be > configured on systems that are not using pdata. > > Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> > --- > Documentation/devicetree/bindings/input/arizona-haptics.txt | 10 ++++++++++ > MAINTAINERS | 1 + > drivers/input/misc/arizona-haptics.c | 7 +++++++ > 3 files changed, 18 insertions(+) > create mode 100644 Documentation/devicetree/bindings/input/arizona-haptics.txt > > diff --git a/Documentation/devicetree/bindings/input/arizona-haptics.txt b/Documentation/devicetree/bindings/input/arizona-haptics.txt > new file mode 100644 > index 0000000..a3e767b > --- /dev/null > +++ b/Documentation/devicetree/bindings/input/arizona-haptics.txt > @@ -0,0 +1,10 @@ > +Cirrus Logic Arizona class audio SoCs > + > +This document lists haptics bindings for these codecs. > +Also see the primary binding document: > + ../mfd/arizona.txt > + > +Optional properties: > + - wlf,hap-act : Single value defining the actuator type, as per the HAP_ACT > + register field. See the codec datasheet for the available HAP_ACT values > + and their meaning. What node does this property apply to? Document this in mfd/arizona.txt. I would like the possible values documented here or a better education as to what this is because I have no idea if this property makes sense and I can't read everybody's datasheet. Just because you have it as platform data doesn't mean it belongs in DT. Rob
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web