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: <d4a6a640c373b6d939e147691efa596c@walle.cc>
Date:   Wed, 26 Apr 2023 13:53:03 +0200
From:   Michael Walle <michael@...le.cc>
To:     "Sahin, Okan" <Okan.Sahin@...log.com>
Cc:     andy.shevchenko@...il.com,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        linux-gpio@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/2] gpio: ds4520: Add ADI DS4520 Regulator Support

Hi,

> I think I understand what you are trying to say so far. I did not have 
> too much
> experience related to gpio. I will set pull_up register in .set_config
> However, I did not understand where its parameters come from.
> set_config(struct gpio_chip *chip, unsigned int offset,
> 	      unsigned long config)
> It might be trivial question, but Where does config come from?

Others have to answer that one as I don't have that much experience 
either.

> At the end, I should rewrite the code using regmap_gpio, right? So if I 
> rewrite
> code using regmap_gpio, how can I replace set_config(...)?

You'd have to add a .set_config to gpio_regmap_config and then in

gpio_regmap_register():
   gpio->set_config = config->set_config;

I don't think it makes sense to have a default implementation in 
gpio-regmap,
the variances between "simple" gpio controllers might be too broad.

-michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ