linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Usyskin, Alexander" <alexander.usyskin@intel.com>
Cc: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
	"Gupta, Anshuman" <anshuman.gupta@intel.com>,
	"Deak, Imre" <imre.deak@intel.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"De Marchi, Lucas" <lucas.demarchi@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Tvrtko Ursulin" <tursulin@ursulin.net>,
	"Weil, Oren jer" <oren.jer.weil@intel.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 06/10] mtd: intel-dg: wake card on operations
Date: Mon, 11 Nov 2024 21:27:37 +0100	[thread overview]
Message-ID: <87msi5o6rq.fsf@bootlin.com> (raw)
In-Reply-To: <CY5PR11MB6366051E35678864805BC89CED582@CY5PR11MB6366.namprd11.prod.outlook.com> (Alexander Usyskin's message of "Mon, 11 Nov 2024 11:29:47 +0000")

Hi Alexander,

Please reduce the context when answering, otherwise it's hard to find
all places where you commented.

>> > > > That's the part that I'm not sure if I agree. if I remember from some
>> > > > experiments in the past,
>> > > > when you call to wake up the child, the parent will wakeup first anyway.
>> > > >
>> > > The child (mtd device) does not exist at this point of time.
>> > > To create MTD device, the partition table should be provided
>> > > and it read directly from flash that should be powered to do read.
>> >
>> > I don't understand... you have the mtd->dev at this point... this is
>> > the one you should be touching, not the mtd->dev.parent... even at the
>> > probe, but moreover on everywhere else as well.
>> >
>> 
>> At the probe time I do not have dev->mtd, but now I see you point here.
>> I'll separate power management:
>> - probe before dev->mtd creation will use aux_dev->dev (that will be mtd-
>> >dev.parent later)
>> - mtd functions will use mtd->dev
>> 
>> Is this that you have in mind?
>
> I've tried it and found out that mtd->dev is not initialized if partitions are present [1].
> Miquel - this may be the reason why other mtd drivers use pci or platform
> devices to manage runtime pm.
> Or I have missed something?

Please keep in mind there is _a lot_ of history behind mtd, and
sometimes choices from the past cannot be simply "fixed" without
breaking userspace. The problem with mtd is that the "mtd" structure
defines nothing with precision. It may be a controller, a chip, a
partition, or whatever mix of those. In this particular case, I believe
you are mentioning the KEEP_PARTITIONED_MASTER configuration, which by
default is unset, which means you'll loose the "top level" mtd device?

However in general I believe the "framework" struct device is maybe less
relevant than the "bus" struct device when it comes to runtime PM, so
actually I would eventually expect this device to be used?

> [1] https://elixir.bootlin.com/linux/v6.12-rc6/source/drivers/mtd/mtdcore.c#L1078

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2024-11-11 20:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 10:41 [PATCH 00/10] mtd: add driver for Intel discrete graphics Alexander Usyskin
2024-10-22 10:41 ` [PATCH 01/10] mtd: add driver for intel graphics non-volatile memory device Alexander Usyskin
2024-11-04 21:22   ` Rodrigo Vivi
2024-10-22 10:41 ` [PATCH 02/10] mtd: intel-dg: implement region enumeration Alexander Usyskin
2024-10-22 10:41 ` [PATCH 03/10] mtd: intel-dg: implement access functions Alexander Usyskin
2024-10-22 10:41 ` [PATCH 04/10] mtd: intel-dg: register with mtd Alexander Usyskin
2024-10-22 10:41 ` [PATCH 05/10] mtd: intel-dg: align 64bit read and write Alexander Usyskin
2024-10-22 10:41 ` [PATCH 06/10] mtd: intel-dg: wake card on operations Alexander Usyskin
2024-10-28 14:57   ` Rodrigo Vivi
2024-10-28 15:01     ` Gupta, Anshuman
2024-10-29 11:24       ` Usyskin, Alexander
2024-11-04 21:16         ` Rodrigo Vivi
2024-11-05 12:17           ` Usyskin, Alexander
2024-11-07 22:49             ` Rodrigo Vivi
2024-11-08  9:01               ` Miquel Raynal
2024-11-10 13:16               ` Usyskin, Alexander
2024-11-11 11:29                 ` Usyskin, Alexander
2024-11-11 20:27                   ` Miquel Raynal [this message]
2024-12-11  9:46                     ` Usyskin, Alexander
2024-10-22 10:41 ` [PATCH 07/10] drm/i915/nvm: add nvm device for discrete graphics Alexander Usyskin
2024-10-22 10:41 ` [PATCH 08/10] drm/i915/nvm: add support for access mode Alexander Usyskin
2024-10-22 10:41 ` [PATCH 09/10] drm/xe/nvm: add on-die non-volatile memory device Alexander Usyskin
2024-10-28 14:48   ` Rodrigo Vivi
2024-11-04 21:22     ` Rodrigo Vivi
2024-10-22 10:41 ` [PATCH 10/10] drm/xe/nvm: add support for access mode Alexander Usyskin

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=87msi5o6rq.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=airlied@gmail.com \
    --cc=alexander.usyskin@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=lucas.demarchi@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=oren.jer.weil@intel.com \
    --cc=richard@nod.at \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tursulin@ursulin.net \
    --cc=tzimmermann@suse.de \
    --cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).