From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Raag Jadav <raag.jadav@intel.com>
Cc: gregkh@linuxfoundation.org, david.m.ertman@intel.com,
ira.weiny@intel.com, lee@kernel.org,
mika.westerberg@linux.intel.com, heikki.krogerus@linux.intel.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] mfd: core: Support auxiliary device
Date: Sat, 19 Apr 2025 18:28:28 +0300 [thread overview]
Message-ID: <aAPBHBplhmZ_D0jC@smile.fi.intel.com> (raw)
In-Reply-To: <20250418123433.2586383-1-raag.jadav@intel.com>
On Fri, Apr 18, 2025 at 06:04:33PM +0530, Raag Jadav wrote:
> Extend MFD subsystem to support auxiliary child device. This is useful
> for MFD usecases where parent device is on a discoverable bus and doesn't
> fit into the platform device criteria. Purpose of this implementation is
> to provide discoverable MFDs just enough infrastructure to register
> independent child devices with their own memory and interrupt resources
> without abusing the platform device.
>
> Current support is limited to just PCI type MFDs, but this can be further
> extended to support other types like USB in the future.
> create mode 100644 include/linux/mfd/aux.h
...
> config MFD_CORE
> tristate
> + select AUXILIARY_BUS
> select IRQ_DOMAIN
> default n
Can be dropped. It's the default 'default' and with user invisible
configuration, it makes even less sense.
...
> +/*
> + * Common structure between MFD parent and auxiliary child device.
> + * To be used by leaf drivers to access child device resources.
> + */
> +struct mfd_aux_device {
> + struct auxiliary_device auxdev;
> + struct resource mem;
> + struct resource irq;
> + /* Place holder for other types */
> + struct resource ext;
I don't like it. It's no-scalable solution, just make it VLA. Each resource
already has type in case one needs to extract an exact one, also this won't
work in case of the two resources for memory or IRQ needed.
> +};
...
> +/* TODO: Convert the platform device abusers and remove this flag */
> +#define MFD_AUX_TYPE BIT(31)
Yeah, LKP wants this to be signed... Or 'id' to be unsigned.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-04-19 15:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 12:34 [PATCH v3] mfd: core: Support auxiliary device Raag Jadav
2025-04-18 15:29 ` kernel test robot
2025-04-19 15:28 ` Andy Shevchenko [this message]
2025-04-20 6:20 ` Raag Jadav
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=aAPBHBplhmZ_D0jC@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=david.m.ertman@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=ira.weiny@intel.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=raag.jadav@intel.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