lkml.org 
[lkml]   [2020]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH 1/7] pwm: rename the PWM_POLARITY_INVERSED enum
    Hello,

    [dropping Tony Prisk <linux@prisktech.co.nz> from recipients]

    On Thu, Mar 19, 2020 at 01:40:28PM +0200, Oleksandr Suvorov wrote:
    > Thierry, I see the PWM core converts the bit field "third cell" into
    > the polarity variable.
    > Now I probably understand your sight and agree that we shouldn't give
    > the same names to bits in bitfield (dts) and values of a variable.
    >
    > But there are lots of useless "0" values of third cell of "pwms"
    > option in dts files.
    >
    > I see 2 ways now:
    > - just remove all "0" "third cell" from "pwms" options in dts files. I
    > see this "0" confuses some people.

    Then you have to overwrite pwm-cells of the provider. If there are two
    PWMs used from the same provider and only one is inverted this won't
    work. (Not entirely sure I understood your suggestion.) So I don't like
    this suggestion.

    And also in my eyes this isn't clearer, just more complicated to use.

    > - convert pwm_state.polarity into pwm_state.flags and use bitfield
    > directly from dtb.
    > It simplifies the parsing logic and makes adding new flags easier.

    *shrug*, I don't care much.

    Best regards
    Uwe

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

    \
     
     \ /
      Last update: 2020-03-19 13:11    [W:6.782 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site