| 27d58498 | 05-Mar-2026 |
Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
platform/chrome: wilco_ec: event: Convert to a platform driver
In all cases in which a struct acpi_driver is used for binding a driver to an ACPI device object, a corresponding platform device is cr
platform/chrome: wilco_ec: event: Convert to a platform driver
In all cases in which a struct acpi_driver is used for binding a driver to an ACPI device object, a corresponding platform device is created by the ACPI core and that device is regarded as a proper representation of underlying hardware. Accordingly, a struct platform_driver should be used by driver code to bind to that device. There are multiple reasons why drivers should not bind directly to ACPI device objects [1].
Overall, it is better to bind drivers to platform devices than to their ACPI companions, so convert the ChromeOS Wilco Embedded Controller event ACPI driver to a platform one.
While this is not expected to alter functionality, it changes sysfs layout and so it will be visible to user space.
Link: https://lore.kernel.org/all/2396510.ElGaqSPkdT@rafael.j.wysocki/ [1] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/9600287.CDJkKcVGEf@rafael.j.wysocki Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
show more ...
|
| 02b496aa | 29-Mar-2024 |
Tzung-Bi Shih <tzungbi@kernel.org> |
platform/chrome: wilco_ec: core: provide ID table for avoiding fallback match
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com
platform/chrome: wilco_ec: core: provide ID table for avoiding fallback match
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Benson Leung <bleung@chromium.org> Link: https://lore.kernel.org/r/20240329075630.2069474-19-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
show more ...
|
| 3f638e4a | 29-Mar-2024 |
Tzung-Bi Shih <tzungbi@kernel.org> |
platform/chrome: wilco_ec: event: remove redundant MODULE_ALIAS
There is no platform driver in the file. Remove the redundant MODULE_ALIAS().
Reviewed-by: Benson Leung <bleung@chromium.org> Review
platform/chrome: wilco_ec: event: remove redundant MODULE_ALIAS
There is no platform driver in the file. Remove the redundant MODULE_ALIAS().
Reviewed-by: Benson Leung <bleung@chromium.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240329075630.2069474-18-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
show more ...
|
| 30afa63e | 29-Mar-2024 |
Tzung-Bi Shih <tzungbi@kernel.org> |
platform/chrome: wilco_ec: debugfs: provide ID table for avoiding fallback match
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.
platform/chrome: wilco_ec: debugfs: provide ID table for avoiding fallback match
Instead of using fallback driver name match, provide ID table[1] for the primary match.
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Benson Leung <bleung@chromium.org> Link: https://lore.kernel.org/r/20240329075630.2069474-17-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
show more ...
|
| 7396a5b9 | 27-Sep-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
platform/chrome/wilco_ec: telemetry: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it'
platform/chrome/wilco_ec: telemetry: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove().
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230927081040.2198742-13-u.kleine-koenig@pengutronix.de Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
show more ...
|