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] [day] [month] [year] [list]
Date:   Wed, 27 Apr 2022 19:18:07 +0530
From:   "Satya Priya Kakitapalli (Temp)" <quic_c_skakit@...cinc.com>
To:     Stephen Boyd <swboyd@...omium.org>
CC:     <linux-arm-msm@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V10 4/9] mfd: pm8008: Add reset-gpios


On 4/27/2022 12:00 PM, Stephen Boyd wrote:
> Quoting Satya Priya Kakitapalli (Temp) (2022-04-26 23:03:08)
>> On 4/27/2022 10:58 AM, Satya Priya Kakitapalli (Temp) wrote:
>>> On 4/18/2022 10:34 AM, Satya Priya Kakitapalli (Temp) wrote:
>>>> On 4/15/2022 5:40 AM, Stephen Boyd wrote:
>>>>> Quoting Satya Priya (2022-04-14 05:30:13)
>>>>>> diff --git a/drivers/mfd/qcom-pm8008.c b/drivers/mfd/qcom-pm8008.c
>>>>>> index c472d7f..97a72da 100644
>>>>>> --- a/drivers/mfd/qcom-pm8008.c
>>>>>> +++ b/drivers/mfd/qcom-pm8008.c
>>>>>> +               return PTR_ERR(chip->reset_gpio);
>>>>>> +       }
>>>>>> +       gpiod_set_value(chip->reset_gpio, 1);
>>>>> Does this do anything? Does this work just as well?
>>>>>
>>>>>      reset_gpio = devm_gpiod_get(chip->dev, "reset", GPIOD_OUT_LOW);
>>>>>      if (IS_ERR(reset_gpio))
>>>>>          return PTR_ERR(reset_gpio);
>>>>>
>>> This is not working as expected. We need to add
>>> "gpiod_set_value(chip->reset_gpio, 1);"  to actually toggle the line.
>>>
>> I checked again and it is working after using GPIOD_OUT_HIGH instead of LOW.
>>
>> reset_gpio = devm_gpiod_get(chip->dev, "reset", GPIOD_OUT_HIGH);
>>       if (IS_ERR(reset_gpio))
>>           return PTR_ERR(reset_gpio);
>>
> What do you have in DT for the 'reset-gpios' property? GPIOD_OUT_HIGH
> means the reset line is asserted, which presumably you don't want to be
> the case because you typically deassert a reset to "take it out of
> reset". Using GPIOD_OUT_HIGH probably works because DT has the wrong
> GPIO flag, i.e.  GPIO_ACTIVE_HIGH, for an active low reset, or vice
> versa.


Yeah, I had GPIOD_OUT_HIGH in DT, now I changed and it is working fine 
with GPIOD_OUT_LOW.

Powered by blists - more mailing lists