linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Ceresoli <lucaceresoli77@gmail.com>
To: Peter Rosin <peda@axentia.se>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Luca Ceresoli <luca@lucaceresoli.net>,
	Wolfram Sang <wsa@the-dreams.de>
Subject: Re: [PATCH v3] i2c: mux: remove duplicated i2c_algorithm
Date: Wed, 10 Oct 2018 17:48:20 +0200	[thread overview]
Message-ID: <70c48ade-b2ac-dde8-4b3e-aa4b2f19940a@gmail.com> (raw)
In-Reply-To: <99cfa6a2-9a60-6bdd-2542-9dd78af75758@axentia.se>

Hi Peter,

On 08/10/2018 23:43, Peter Rosin wrote:
> On 2018-10-03 17:19, Luca Ceresoli wrote:
>> From: Luca Ceresoli <luca@lucaceresoli.net>
>>
>> i2c-mux instantiates one i2c_algorithm for each downstream adapter.
>> However these algorithms are all identical, depending only on the
>> parent adapter.
>>
>> Avoid duplication by hoisting the i2c_algorithm from the adapters to
>> the i2c_mux_core object, and reuse it in all the adapters.
> 
> Ouch, while I like the concept of having one i2c_algorithm per mux,
> this patch is not working. Various i2c-mux drivers set the
> muxc->mux_locked variable *after* the i2c_mux_alloc call, and this
> patch breaks such use.
> 
> So, the patch needs some reworking. Sorry for not noticing this
> earlier.

Thanks for the heads up.

3 drivers have the issue you mentioned, and two of them are not trivial
to fix. Ok, as soon as I can spend a little time on this I'll have a
look and hopefully send a fixed patch.

Regards,
-- 
Luca

  reply	other threads:[~2018-10-10 15:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 15:19 [PATCH v3] i2c: mux: remove duplicated i2c_algorithm Luca Ceresoli
2018-10-08 21:43 ` Peter Rosin
2018-10-10 15:48   ` Luca Ceresoli [this message]
2018-11-18 11:13     ` Luca Ceresoli
2018-11-27 18:51       ` Peter Rosin
2018-12-09 21:46         ` Luca Ceresoli

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=70c48ade-b2ac-dde8-4b3e-aa4b2f19940a@gmail.com \
    --to=lucaceresoli77@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca@lucaceresoli.net \
    --cc=peda@axentia.se \
    --cc=wsa@the-dreams.de \
    /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;
as well as URLs for NNTP newsgroup(s).