From: Andrew Lunn <andrew@lunn.ch>
To: Lee Jones <lee.jones@linaro.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mfd: tqmx86: IO controller with i2c, wachdog and gpio
Date: Fri, 21 Dec 2018 22:28:31 +0100 [thread overview]
Message-ID: <20181221212831.GF5023@lunn.ch> (raw)
In-Reply-To: <20181221143505.GQ13248@dell>
> > +static int tqmx86_create_platform_device(const struct dmi_system_id *id)
>
> This blows my mind.
>
> - The normal module_init() calls are initiated calling for a DMI scan
> - Then the DMI device init()s
> - You use the DMI init() to register this device as a platform device
> - Then this platform device then probes
>
> That seems very incestuous.
>
> What is the reason for all the hoop jumping?
Hi Lee
It does seem like a lot of hoops to jump through. But i don't see a
way to avoid it. When you are matching on DMI tables, all you appear
to be able to do is register a callback to be called. This callback
cannot be used as a driver probe, you cannot return -EPROBE_DEFER and
expect it to be called again, etc. So if you do want to create a
device, you need to go via a platform_device.
If you know of a better way, i would be happy to implement it.
Thanks
Andrew
next prev parent reply other threads:[~2018-12-21 21:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 16:53 [PATCH v2] mfd: tqmx86: IO controller with i2c, wachdog and gpio Andrew Lunn
2018-12-21 14:35 ` Lee Jones
2018-12-21 17:09 ` Andrew Lunn
2018-12-21 21:28 ` Andrew Lunn [this message]
2018-12-24 10:44 ` Andrew Lunn
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=20181221212831.GF5023@lunn.ch \
--to=andrew@lunn.ch \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/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