linux-can-fixes-for-5.19-20220720

-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEBsvAIBsPu6mG7thcrX5LkNig010FAmLXvYcTHG1rbEBwZW5n
 dXRyb25peC5kZQAKCRCtfkuQ2KDTXcO2B/0cAQIhlYDpKnonXl3PJ9RouTbHrYPe
 3fhckfGfepzldy2xjTEJ5V4Mk7I0DcGfjkN7Zcb5JysjON939BpfJbKWSQBWh/DC
 bmnukkb3FzrKsV2A2e3gF25stSf0XFQrMkFMyYROTJBfN8nWrVUFB7P0EthaXhpV
 NS0kmLh/BCO6syxkT0g3pEPPjBP5u8Blthiirzc+oCc2p5aVIwHPwy9BZaCWigXS
 ZV//5mu2X1zPgb55CaAqNT6t3N3aHUrKyC1uwodOlFSfdPQ6JKhF4+P199rm6dH3
 D3EDNNM/uXTUpZ9EhRUESQpB1v50SSwo/hA1o4r1NB3Vz4batHlkXnli
 =WcvU
 -----END PGP SIGNATURE-----

Merge tag 'linux-can-fixes-for-5.19-20220720' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can

Marc Kleine-Budde says:

====================
this is a pull request of 2 patches for net/master.

The first patch is by me and fixes the detection of the mcp251863 in
the mcp251xfd driver.

The last patch is by Liang He and adds a missing of_node_put() in the
rcar_canfd driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2022-07-20 11:13:54 +01:00
commit 44484fa8ee
2 changed files with 14 additions and 5 deletions

View File

@ -1843,6 +1843,7 @@ static int rcar_canfd_probe(struct platform_device *pdev)
of_child = of_get_child_by_name(pdev->dev.of_node, name);
if (of_child && of_device_is_available(of_child))
channels_mask |= BIT(i);
of_node_put(of_child);
}
if (chip_id != RENESAS_RZG2L) {

View File

@ -1690,8 +1690,8 @@ static int mcp251xfd_register_chip_detect(struct mcp251xfd_priv *priv)
u32 osc;
int err;
/* The OSC_LPMEN is only supported on MCP2518FD, so use it to
* autodetect the model.
/* The OSC_LPMEN is only supported on MCP2518FD and MCP251863,
* so use it to autodetect the model.
*/
err = regmap_update_bits(priv->map_reg, MCP251XFD_REG_OSC,
MCP251XFD_REG_OSC_LPMEN,
@ -1703,10 +1703,18 @@ static int mcp251xfd_register_chip_detect(struct mcp251xfd_priv *priv)
if (err)
return err;
if (osc & MCP251XFD_REG_OSC_LPMEN)
devtype_data = &mcp251xfd_devtype_data_mcp2518fd;
else
if (osc & MCP251XFD_REG_OSC_LPMEN) {
/* We cannot distinguish between MCP2518FD and
* MCP251863. If firmware specifies MCP251863, keep
* it, otherwise set to MCP2518FD.
*/
if (mcp251xfd_is_251863(priv))
devtype_data = &mcp251xfd_devtype_data_mcp251863;
else
devtype_data = &mcp251xfd_devtype_data_mcp2518fd;
} else {
devtype_data = &mcp251xfd_devtype_data_mcp2517fd;
}
if (!mcp251xfd_is_251XFD(priv) &&
priv->devtype_data.model != devtype_data->model) {