lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E3A2DC80-3D8D-451F-9EA1-A3262F4A3C43@aspeedtech.com>
Date:   Mon, 7 Nov 2022 09:25:37 +0000
From:   Billy Tsai <billy_tsai@...eedtech.com>
To:     Biju Das <biju.das.jz@...renesas.com>,
        "jdelvare@...e.com" <jdelvare@...e.com>,
        "linux@...ck-us.net" <linux@...ck-us.net>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "joel@....id.au" <joel@....id.au>,
        "andrew@...id.au" <andrew@...id.au>,
        "lee.jones@...aro.org" <lee.jones@...aro.org>,
        "thierry.reding@...il.com" <thierry.reding@...il.com>,
        "u.kleine-koenig@...gutronix.de" <u.kleine-koenig@...gutronix.de>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-aspeed@...ts.ozlabs.org" <linux-aspeed@...ts.ozlabs.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-pwm@...r.kernel.org" <linux-pwm@...r.kernel.org>,
        BMC-SW <BMC-SW@...eedtech.com>,
        "garnermic@...a.com" <garnermic@...a.com>
CC:     kernel test robot <lkp@...el.com>,
        Geert Uytterhoeven <geert+renesas@...der.be>
Subject: Re: [v3 2/3] pwm: Add Aspeed ast2600 PWM support

On 2022/11/7, 4:55 PM, "Biju Das" <biju.das.jz@...renesas.com> wrote:

    > > -----Original Message-----
    > > From: Billy Tsai <billy_tsai@...eedtech.com>
    > > Sent: 07 November 2022 08:48
    > > To: Biju Das <biju.das.jz@...renesas.com>; jdelvare@...e.com; linux@...ck-
    > > us.net; robh+dt@...nel.org; joel@....id.au; andrew@...id.au;
    > > lee.jones@...aro.org; thierry.reding@...il.com; u.kleine-
    > > koenig@...gutronix.de; p.zabel@...gutronix.de; linux-hwmon@...r.kernel.org;
    > > devicetree@...r.kernel.org; linux-arm-kernel@...ts.infradead.org; linux-
    > > aspeed@...ts.ozlabs.org; linux-kernel@...r.kernel.org; linux-
    > > pwm@...r.kernel.org; BMC-SW <BMC-SW@...eedtech.com>; garnermic@...a.com
    > > Cc: kernel test robot <lkp@...el.com>
    > > Subject: Re: [v3 2/3] pwm: Add Aspeed ast2600 PWM support
    > > 
    > > On 2022/11/2, 11:56 PM, "Biju Das" <biju.das.jz@...renesas.com> wrote:
    > > 
    > >     > > +	parent_dev = of_find_device_by_node(np);
    > >     > > +	priv->clk = devm_clk_get_enabled(&parent_dev->dev, NULL);
    > >     > > +	if (IS_ERR(priv->clk))
    > >     > > +		return dev_err_probe(dev, PTR_ERR(priv->clk),
    > >     > > +				     "Couldn't get clock\n");
    > > 
    > >     > What is the use case?
    > > 
    > >     > Is pwm configured by boot loader initially ?
    > > 
    > >     > Or
    > > 
    > >     > pwm configured by Linux, not by the bootloader initially?
    > > 
    > >     > Or
    > > 
    > >     > Driver needs to handle both cases?
    > > 
    > >     > Just asking, because you are turning on the clock unnecessarily here,
    > >     > If you need to address all the use cases. If it is just first one, then
    > >     > It is ok.
    > > 
    > > Hi Biju,
    > > 
    > > The driver want to handle all of the use cases. Can you tell me why turning
    > > on the clock is unnecessarily here?

    > For the use case, "pwm configured by Linux, not by the bootloader initially",

    > You are unnecessarily turning on the clocks. You could 

    > enable it during pwm_enable
    > and disable it during pwm_disable.

    > For configuring registers, while pwm is in disable state, 
    > you could just turn on the clock and do the register configurations and turn it off.

    > By this way you are saving power.

Hi Biju,

This clock is the source clock for the pwm controller (include the accessing for the register).
For the output of the PWM (pwm_enable/pwm_disable), the controller have another register to control it.

Best Regards,
Billy Tsai





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ