public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Mark Jonas <mark.jonas@de.bosch.com>
Cc: Support Opensource <support.opensource@diasemi.com>,
	Lee Jones <lee.jones@linaro.org>,
	linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	Adam.Thomson.Opensource@diasemi.com,
	stwiss.opensource@diasemi.com, marek.vasut@gmail.com,
	tingquan.ruan@cn.bosch.com, hubert.streidl@de.bosch.com
Subject: Re: [PATCH v3] mfd: da9063: Support SMBus and I2C mode
Date: Sat, 6 Feb 2021 02:16:01 +0100	[thread overview]
Message-ID: <20210206011601.GA3847@kunai> (raw)
In-Reply-To: <20210205155006.130458-1-mark.jonas@de.bosch.com>

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]


> +	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;


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2021-02-06  4:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 15:50 [PATCH v3] mfd: da9063: Support SMBus and I2C mode Mark Jonas
2021-02-06  1:16 ` Wolfram Sang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210206011601.GA3847@kunai \
    --to=wsa@kernel.org \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=hubert.streidl@de.bosch.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=mark.jonas@de.bosch.com \
    --cc=stwiss.opensource@diasemi.com \
    --cc=support.opensource@diasemi.com \
    --cc=tingquan.ruan@cn.bosch.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox