Thread (23 messages) 23 messages, 5 authors, 2020-08-23

Re: [RFC PATCH 05/10] dt-bindings: pwm: Add bindings for PWM function in Netronix EC

From: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Date: 2020-08-23 22:43:46
Also in: linux-arm-kernel, linux-devicetree, linux-pwm, lkml

On Sun, Jun 21, 2020 at 08:41:23PM +0200, Andreas Kemnade wrote:
On Sun, 21 Jun 2020 00:42:16 +0200
Jonathan Neuschäfer [off-list ref] wrote:
quoted
The Netronix embedded controller as found in Kobo Aura and Tolino Shine
supports one PWM channel, which is used to control the frontlight
brightness on these devices.

Known problems:
- `make dt_binding_check` shows the following warnings:
  Documentation/devicetree/bindings/mfd/netronix,ntxec.example.dts:49.17-42:
  Warning (pwms_property): /example-0/backlight:pwms: cell 2 is not a
  phandle reference
  Documentation/devicetree/bindings/mfd/netronix,ntxec.example.dts:49.17-42:
  Warning (pwms_property): /example-0/backlight:pwms: Could not get
  phandle node for (cell 2)
In the tolino sources in ./drivers/misc/ntx-misc.c I find this line

        if(4==gptHWCFG->m_val.bFL_PWM) {

No idea what it does but I would expect to have a kind of translation to
a dt property?
As far as I understand it, FL_PWM=4 means that there is a second PWM
channel, in order to provide different backlight colors.

I think it should be possible to simply extend the binding to list
another available PWM channel, once we add support for such hardware.
quoted
+                    ec_pwm: pwm {
+                            compatible = "netronix,ntxec-pwm";
+                            #pwm-cells = <1>;
shouldn't that be 2?
quoted
+                    };
             };
     };
+
+    backlight {
+            compatible = "pwm-backlight";
+            pwms = <&ec_pwm 0 50000>;
since you have 2 values after the &ec_pwm 
[...]
quoted
+properties:
+  compatible:
+    const: netronix,ntxec-pwm
+
+  "#pwm-cells":
+    const: 1
shouln't that be 2?
Right, I'll fix that.


Thanks,
Jonathan

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help