#
e0e59c53 |
| 29-Mar-2024 |
Tzung-Bi Shih <tzungbi@kernel.org> |
platform/chrome: cros_usbpd_logger: 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: cros_usbpd_logger: 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: Benson Leung <bleung@chromium.org> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240329075630.2069474-7-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
show more ...
|
#
b6c1fea8 |
| 27-Sep-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
platform/chrome: cros_usbpd_logger: 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
platform/chrome: cros_usbpd_logger: 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-9-u.kleine-koenig@pengutronix.de Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
show more ...
|
#
bbb7ad49 |
| 14-Apr-2020 |
Enric Balletbo i Serra <enric.balletbo@collabora.com> |
platform/chrome: cros_usbpd_logger: Add __printf annotation to append_str()
This allows the compiler to verify the format strings vs the types of the arguments. Also, silence the warning (triggered
platform/chrome: cros_usbpd_logger: Add __printf annotation to append_str()
This allows the compiler to verify the format strings vs the types of the arguments. Also, silence the warning (triggered by W=1):
cros_usbpd_logger.c:55:2: warning: function ‘append_str’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Benson Leung <bleung@chromium.org>
show more ...
|
#
11f1eabe |
| 03-Dec-2019 |
Enric Balletbo i Serra <enric.balletbo@collabora.com> |
cros_ec: treewide: Remove 'include/linux/mfd/cros_ec.h'
This header file now only includes the cros_ec_dev struct, however, is the 'include/linux/platform_data/cros_ec_proto.h' who contains the defi
cros_ec: treewide: Remove 'include/linux/mfd/cros_ec.h'
This header file now only includes the cros_ec_dev struct, however, is the 'include/linux/platform_data/cros_ec_proto.h' who contains the definition of all the Chrome OS EC related structs. There is no reason to have a separate include for this struct so move to the place where other structs are defined. That way, we can remove the include itself, but also simplify the common pattern
#include <linux/mfd/cros_ec.h> #include <linux/platform_data/cros_ec_proto.h>
for a single include
#include <linux/platform_data/cros_ec_proto.h>
The changes to remove the cros_ec.h include were generated with the following shell script:
git grep -l "<linux/mfd/cros_ec.h>" | xargs sed -i '/<linux\/mfd\/cros_ec.h>/d'
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Sebastian Reichel <sre@kernel.org> Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
#
c2ce4d23 |
| 13-Nov-2019 |
Chuhong Yuan <hslester96@gmail.com> |
platform/chrome: cros_usbpd_logger: add missed destroy_workqueue in remove
The driver forgets to destroy workqueue in remove. Add the missed call to fix it.
Signed-off-by: Chuhong Yuan <hslester96@
platform/chrome: cros_usbpd_logger: add missed destroy_workqueue in remove
The driver forgets to destroy workqueue in remove. Add the missed call to fix it.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
show more ...
|
#
4c1fde50 |
| 11-Sep-2019 |
Navid Emamdoost <navid.emamdoost@gmail.com> |
platform/chrome: cros_usbpd_logger: null check create_singlethread_workqueue
In cros_usbpd_logger_probe the return value of create_singlethread_workqueue may be null, it should be checked.
Signed-o
platform/chrome: cros_usbpd_logger: null check create_singlethread_workqueue
In cros_usbpd_logger_probe the return value of create_singlethread_workqueue may be null, it should be checked.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
show more ...
|
#
840d9f13 |
| 02-Sep-2019 |
Enric Balletbo i Serra <enric.balletbo@collabora.com> |
mfd / platform: cros_ec: Reorganize platform and mfd includes
There is a bit of mess between cros-ec mfd includes and platform includes. For example, we have a linux/mfd/cros_ec.h include that expor
mfd / platform: cros_ec: Reorganize platform and mfd includes
There is a bit of mess between cros-ec mfd includes and platform includes. For example, we have a linux/mfd/cros_ec.h include that exports the interface implemented in platform/chrome/cros_ec_proto.c. Or we have a linux/mfd/cros_ec_commands.h file that is non related to the multifunction device (in the sense that is not exporting any function of the mfd device). This causes crossed includes between mfd and platform/chrome subsystems and makes the code difficult to read, apart from creating 'curious' situations where a platform/chrome driver includes a linux/mfd/cros_ec.h file just to get the exported functions that are implemented in another platform/chrome driver.
In order to have a better separation on what the cros-ec multifunction driver does and what the cros-ec core provides move and rework the affected includes doing:
- Move cros_ec_commands.h to include/linux/platform_data/cros_ec_commands.h - Get rid of the parts that are implemented in the platform/chrome/cros_ec_proto.c driver from include/linux/mfd/cros_ec.h to a new file include/linux/platform_data/cros_ec_proto.h - Update all the drivers with the new includes, so - Drivers that only need to know about the protocol include - linux/platform_data/cros_ec_proto.h - linux/platform_data/cros_ec_commands.h - Drivers that need to know about the cros-ec mfd device also include - linux/mfd/cros_ec.h
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Tested-by: Gwendal Grignou <gwendal@chromium.org> Series changes: 3 - Fix dereferencing pointer to incomplete type 'struct cros_ec_dev' (lkp) Signed-off-by: Lee Jones <lee.jones@linaro.org>
show more ...
|
#
a2679b64 |
| 03-Apr-2019 |
Guenter Roeck <groeck@chromium.org> |
platform/chrome: Add CrOS USB PD logging driver
The CrOS USB PD logging feature is logically separate functionality of the charge manager, hence has its own driver. The driver logs the event data fo
platform/chrome: Add CrOS USB PD logging driver
The CrOS USB PD logging feature is logically separate functionality of the charge manager, hence has its own driver. The driver logs the event data for the USB PD charger available in some ChromeOS Embedded Controllers.
Signed-off-by: Guenter Roeck <groeck@chromium.org> [remove macro to APPEND_STRING and minor cleanups] Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
show more ...
|