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: <DB6PR0401MB2438371950CE6663FA1499F78FDE0@DB6PR0401MB2438.eurprd04.prod.outlook.com>
Date:   Wed, 23 Dec 2020 07:06:15 +0000
From:   Biwen Li <biwen.li@....com>
To:     "Biwen Li (OSS)" <biwen.li@....nxp.com>,
        Leo Li <leoyang.li@....com>,
        "alexandre.belloni@...tlin.com" <alexandre.belloni@...tlin.com>,
        Anson Huang <anson.huang@....com>,
        Aisheng Dong <aisheng.dong@....com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Jiafei Pan <jiafei.pan@....com>,
        "linux-rtc@...r.kernel.org" <linux-rtc@...r.kernel.org>
Subject: RE: [v2 1/2] rtc: pcf2127: properly set flag WD_CD for rtc
 chips(pcf2129, pca2129)

Hi Alexandre,

Any comments?

Regards,
Biwen Li
> -----Original Message-----
> From: Biwen Li <biwen.li@....nxp.com>
> Sent: 2020年12月2日 11:19
> To: Leo Li <leoyang.li@....com>; alexandre.belloni@...tlin.com; Anson
> Huang <anson.huang@....com>; Aisheng Dong <aisheng.dong@....com>
> Cc: linux-kernel@...r.kernel.org; Jiafei Pan <jiafei.pan@....com>;
> linux-rtc@...r.kernel.org; Biwen Li <biwen.li@....com>
> Subject: [v2 1/2] rtc: pcf2127: properly set flag WD_CD for rtc chips(pcf2129,
> pca2129)
> 
> From: Biwen Li <biwen.li@....com>
> 
> Properly set flag WD_CD for rtc chips(pcf2129, pca2129)
> 
> Signed-off-by: Biwen Li <biwen.li@....com>
> ---
> Change in v2:
> 	- set flag WD_CD according to compatible
> 
>  drivers/rtc/rtc-pcf2127.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c index
> 03c9cb6b0b6e..a5418b657c50 100644
> --- a/drivers/rtc/rtc-pcf2127.c
> +++ b/drivers/rtc/rtc-pcf2127.c
> @@ -620,6 +620,10 @@ static int pcf2127_probe(struct device *dev, struct
> regmap *regmap,
>  	 * Watchdog timer enabled and reset pin /RST activated when timed out.
>  	 * Select 1Hz clock source for watchdog timer.
>  	 * Note: Countdown timer disabled and not available.
> +	 * For pca2129, pcf2129, only bit[7] is for Symbol WD_CD
> +	 * of register watchdg_tim_ctl. The bit[6] is labeled
> +	 * as T. Bits labeled as T must always be written with
> +	 * logic 0.
>  	 */
>  	ret = regmap_update_bits(pcf2127->regmap, PCF2127_REG_WD_CTL,
>  				 PCF2127_BIT_WD_CTL_CD1 |
> @@ -627,7 +631,8 @@ static int pcf2127_probe(struct device *dev, struct
> regmap *regmap,
>  				 PCF2127_BIT_WD_CTL_TF1 |
>  				 PCF2127_BIT_WD_CTL_TF0,
>  				 PCF2127_BIT_WD_CTL_CD1 |
> -				 PCF2127_BIT_WD_CTL_CD0 |
> +				 (device_property_match_string(dev, "compatible",
> "nxp,pcf2127")
> +				  ? (PCF2127_BIT_WD_CTL_CD0) : (0)) |
>  				 PCF2127_BIT_WD_CTL_TF1);
>  	if (ret) {
>  		dev_err(dev, "%s: watchdog config (wd_ctl) failed\n", __func__);
> --
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ