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:   Sat, 6 Feb 2021 02:16:01 +0100
From:   Wolfram Sang <wsa@...nel.org>
To:     Mark Jonas <mark.jonas@...bosch.com>
Cc:     Support Opensource <support.opensource@...semi.com>,
        Lee Jones <lee.jones@...aro.org>, linux-kernel@...r.kernel.org,
        linux-i2c@...r.kernel.org, Adam.Thomson.Opensource@...semi.com,
        stwiss.opensource@...semi.com, marek.vasut@...il.com,
        tingquan.ruan@...bosch.com, hubert.streidl@...bosch.com
Subject: Re: [PATCH v3] mfd: da9063: Support SMBus and I2C mode


> +	if (i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C)) {
> +		dev_info(da9063->dev, "I2C mode");
> +		busmode = 0;
> +	} else {
> +		dev_info(da9063->dev, "SMBus mode");
> +		busmode = DA9063_TWOWIRE_TO;
> +	}

In principle, this looks good and is sane to do. I'd just suggest to
leave out the dev_info calls and maybe just do:

	busmode = i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C) ?
		  0 : DA9063_TWOWIRE_TO;


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ