diff options
author | Vincent Mailhol <mailhol.vincent@wanadoo.fr> | 2022-11-30 20:46:56 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-12-12 13:39:13 +0300 |
commit | 9f06631c3f1f0f298536443df85a6837ba4c5f5c (patch) | |
tree | 867832cd38aea198dd746cc449db68cda6b5d877 /drivers/net/can/usb/etas_es58x/es58x_core.c | |
parent | 01d80532295cd359dc43e6bd71860d5515f84372 (diff) | |
download | linux-9f06631c3f1f0f298536443df85a6837ba4c5f5c.tar.xz |
can: etas_es58x: export product information through devlink_ops::info_get()
ES58x devices report below product information through a custom usb
string:
* the firmware version
* the bootloader version
* the hardware revision
Parse this string, store the results in struct es58x_dev, export:
* the firmware version through devlink's "fw" name
* the bootloader version through devlink's "fw.bootloader" name
* the hardware revisionthrough devlink's "board.rev" name
Those devlink entries are not critical to use the device, if parsing
fails, print an informative log message and continue to probe the
device.
In addition to that, use usb_device::serial to report the device
serial number.
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/all/20221130174658.29282-6-mailhol.vincent@wanadoo.fr
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/usb/etas_es58x/es58x_core.c')
-rw-r--r-- | drivers/net/can/usb/etas_es58x/es58x_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/usb/etas_es58x/es58x_core.c b/drivers/net/can/usb/etas_es58x/es58x_core.c index de884de9fe57..4d6d5a4ac06e 100644 --- a/drivers/net/can/usb/etas_es58x/es58x_core.c +++ b/drivers/net/can/usb/etas_es58x/es58x_core.c @@ -2271,6 +2271,7 @@ static int es58x_probe(struct usb_interface *intf, if (ret) return ret; + es58x_parse_product_info(es58x_dev); devlink_register(priv_to_devlink(es58x_dev)); for (ch_idx = 0; ch_idx < es58x_dev->num_can_ch; ch_idx++) { |