[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ac98845a-2461-4098-a162-0edea662d71c@icloud.com>
Date: Tue, 17 Sep 2024 19:02:47 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Saravana Kannan <saravanak@...gle.com>,
Isaac Manjarres <isaacmanjarres@...gle.com>,
Lu Baolu <baolu.lu@...ux.intel.com>, linux-kernel@...r.kernel.org,
Zijun Hu <quic_zijuhu@...cinc.com>
Subject: Re: [PATCH RFC 0/3] amba: bus: Move reading periphid operation from
amba_match() to amba_probe()
On 2024/9/17 17:52, Russell King (Oracle) wrote:
> On Mon, Sep 09, 2024 at 07:37:31AM +0800, Zijun Hu wrote:
>> This patch series is to make amba_match(), as bus_type @amba_bustype's
>> match(), also follow below ideal rule:
>>
>> bus_type's match() should only return bool type compatible integer 0 or
>> 1 ideally since its main operations are lookup and comparison normally.
>>
>> Which has been followed by match() of all other bus_types in current
>> kernel tree.
>
> How does this work with e.g. udev module loading? If the ID isn't
> known until we attempt to probe a device, then if all AMBA drivers
> are modular, there'll be no drivers registered to cause an attempt
> to match a device to a driver, and thus there will be no
> peripheral IDs for udev to use to load modules.
>
drivers/amba/bus.c have registered a empty AMBA driver @amba_proxy_drv
this change makes AMBA device without valid periphid ONLY match with
the empty driver, that will trigger trying to read periphid with
bus_type's @amba_bustype's amba_probe(). it will send AMBA device adding
uevent once periphid is read out, then udev will notice the uevent and
perform further actions.
Powered by blists - more mailing lists