linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Guo <shawnguo@kernel.org>
To: Ivan Bornyakov <i.bornyakov@metrotek.ru>
Cc: s.hauer@pengutronix.de, kernel@pengutronix.de,
	festevam@gmail.com, linux-imx@nxp.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, system@metrotek.ru
Subject: Re: [PATCH] bus: imx-weim: add DT overlay support for WEIM bus
Date: Mon, 21 Feb 2022 16:34:29 +0800	[thread overview]
Message-ID: <20220221083429.GT2249@dragon> (raw)
In-Reply-To: <20220221080244.bd7wankcdsiwzum4@x260>

On Mon, Feb 21, 2022 at 11:02:44AM +0300, Ivan Bornyakov wrote:
> On Mon, Feb 21, 2022 at 03:25:29PM +0800, Shawn Guo wrote:
> > On Sat, Feb 05, 2022 at 08:50:06AM +0300, Ivan Bornyakov wrote:
> > > Add OF reconfiguration notifier handler for WEIM bus to setup Chip
> > > Select timings on runtime creation of child devices.
> > > 
> > > However, it is not possible to load another DT overlay with conflicting
> > > CS timings with previously loaded overlay, even if the first one is
> > > unloaded.
> > 
> > Are we doing anything if that happens?
> > 
> 
> On device removal there is no access to device node properties, thus it
> is not possible to find out which of CS timings was configured for this
> device to clear theirs 'is_applied'.
> 
> So, if we apply one DT overlay, configure some CS timings, remove this
> overlay, apply another with conflicting timings, we will fail here
> 
> static int weim_timing_setup(...)
> {
> 	...
> 
> 	for (reg_idx = 0; reg_idx < num_regs; reg_idx++) {
> 		...
> 
> 		/* prevent re-configuring a CS that's already been configured */
> 		cst = &ts->cs[cs_idx];
> 		if (cst->is_applied && memcmp(value, cst->regs,
> 					devtype->cs_regs_count * sizeof(u32))) {
> 			dev_err(dev, "fsl,weim-cs-timing conflict on %pOF", np);
> 			return -EINVAL;
> 		}
> 		...
> 	}
> 	...
> }

Ah, right, thanks for clarifying, Ivan!

Shawn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-02-21  8:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05  5:50 [PATCH] bus: imx-weim: add DT overlay support for WEIM bus Ivan Bornyakov
2022-02-05  5:50 ` Ivan Bornyakov
2022-02-21  7:25   ` Shawn Guo
2022-02-21  8:02     ` Ivan Bornyakov
2022-02-21  8:34       ` Shawn Guo [this message]
2022-02-21 18:29 ` [PATCH v2] " Ivan Bornyakov
2022-02-22  2:19   ` Shawn Guo
2022-02-22  5:20 ` [PATCH v3] " Ivan Bornyakov
2022-02-22  6:55   ` Shawn Guo

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=20220221083429.GT2249@dragon \
    --to=shawnguo@kernel.org \
    --cc=festevam@gmail.com \
    --cc=i.bornyakov@metrotek.ru \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=system@metrotek.ru \
    /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).