Hi Hans, On Tue, Oct 25, 2022 at 02:29:28PM +0200, Hans de Goede wrote: > On x86/ACPI platforms touchscreens mostly just work without needing any > device/model specific configuration. But in some cases (mostly with Silead > and Goodix touchscreens) it is still necessary to manually specify various > touchscreen-properties on a per model basis. > > This is handled by drivers/platform/x86/touchscreen_dmi.c which contains > a large list of per-model touchscreen properties which it attaches to the > (i2c)device before the touchscreen driver's probe() method gets called. > This means that ATM changing these settings requires recompiling the > kernel. This makes figuring out what settings/properties a specific > touchscreen needs very hard for normal users to do. > > Add a new, optional, settings_override string argument to > touchscreen_parse_properties(), which takes a list of ; separated > property-name=value pairs, e.g. : > "touchscreen-size-x=1665;touchscreen-size-y=1140;touchscreen-swapped-x-y". > > This new argument can be used by drivers to implement a module option which > allows users to easily specify alternative settings for testing. > > The 2 new touchscreen_property_read_u32() and > touchscreen_property_read_bool() helpers are also exported so that > drivers can use these to add settings-override support to the code > for driver-specific properties. I totally understand the motivation for this, but I do not think that having special handling for only touchscreen properties is the right thing to do. I would very much prefer is we had a more generic approach of adding/overriding properties (via an swnode?). Thanks. -- Dmitry