lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y/0uC1LgeWR0V0ts@smile.fi.intel.com>
Date:   Tue, 28 Feb 2023 00:26:19 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Vladimir Oltean <vladimir.oltean@....com>
Cc:     Daniel Scally <djrscally@...il.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Implementation of fwnode_operations :: device_get_match_data()
 for software nodes?

On Thu, Feb 23, 2023 at 10:37:13PM +0200, Vladimir Oltean wrote:
> Hi,
> 
> I have a need to instantiate a driver written for OF which calls
> device_get_match_data(dev) to get various information based on the
> compatible string.
> 
> I am creating a software node based on the following properties:
> 
> 	struct property_entry props[2] = {
> 		PROPERTY_ENTRY_STRING("compatible", compatible),
> 		{},
> 	};
> 
> (I see I'm not the only one doing this, some drivers/platform/x86/x86-android-tablets.c
> and drivers/platform/chrome/chromeos_laptop.c also do it)
> 
> and the driver in question does begin to probe, but its match_data is
> NULL, because the operation from the title isn't implemented for
> software nodes. So probing ultimately fails.
> 
> Is there some sort or reason why this doesn't exist, other than a lack
> of need?
> 
> Can someone please help me with an implementation of this feature?

I believe that there are few reasons for that:
1) (besides that what Heikki mentioned);
2) the software nodes only for quirks, seems you are trying to implement
something that should have to be implemented as proper DT / ACPI device node.

Can you elaborate why do you need that (as you see no other board file requires
this)?

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ