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]
Message-ID: <d4ebb8a5-9e56-20c5-2bda-03ca2a40378e@linux.intel.com>
Date:   Thu, 13 Sep 2018 16:50:30 +0300
From:   Jarkko Nikula <jarkko.nikula@...ux.intel.com>
To:     Jisheng Zhang <Jisheng.Zhang@...aptics.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Wolfram Sang <wsa@...-dreams.de>
Cc:     linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] i2c: designware: select gpio/default pin when
 prepare/unprepare recovery

On 09/13/2018 11:21 AM, Jisheng Zhang wrote:
> On some platforms, the sda/scl pins are muxed with gpio functions, so
> they could be used for recovery. Select the gpio/default pin function
> when prepare/unprepare recovery.
> 
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@...aptics.com>
> ---
> 
> since v1:
>   - use IS_ERR_OR_NULL
> 
>   drivers/i2c/busses/i2c-designware-core.h   |  3 +++
>   drivers/i2c/busses/i2c-designware-master.c | 22 ++++++++++++++++++++++
>   2 files changed, 25 insertions(+)
> 
...
> +	pinctrl = devm_pinctrl_get(dev->dev);
> +	if (PTR_ERR(pinctrl) == -EPROBE_DEFER)
> +		return -EPROBE_DEFER;
> +	if (!IS_ERR_OR_NULL(pinctrl)) {
> +		dev->pinctrl = pinctrl;
> +		s = pinctrl_lookup_state(pinctrl, PINCTRL_STATE_DEFAULT);
> +		if (!IS_ERR_OR_NULL(s))
> +			dev->pins_default = s;
> +		s = pinctrl_lookup_state(pinctrl, "gpio");
> +		if (!IS_ERR_OR_NULL(s))
> +			dev->pins_gpio = s;
> +	}
> +

Should these be documented in 
Documentation/devicetree/bindings/i2c/i2c-designware.txt?

-- 
Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ