mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
Reset/GPIO/swnode changes for v6.19 (v2)
* Fix chtwc_int33fe build issue since commitd7cdbbc93c("software node: allow referencing firmware nodes"). -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQRRO6F6WdpH1R0vGibVhaclGDdiwAUCaSB5ZBcccC56YWJlbEBw ZW5ndXRyb25peC5kZQAKCRDVhaclGDdiwP8NAQC3CR1DqnUU6vlX3DeoXVrch/IB FwQNe8PNWYUFahc6+AD+PlUHY+0osW2eZ8sUZzoW0FdIHETPKVnRbTUadTzSRgI= =LNsT -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmkoyRMACgkQmmx57+YA GNndhg//TlDVvbKOZoc3uD3CipGLNeySwoZZTjkyfUDqIE+AuqBemue3nqH9j/1V LnZ/ixJA5CnlIFUoHzfrJB0rPztmjbE16pOXtV2nnaGp7BKz8TDNLTtEAdeG9oIQ Cv/mVOvWqSsc6eOFcBhNfxeOBcwBwQRjsHt+STx5hPIxEgjYmKIAQr3qZah8G4c5 pvD1bNFK4qOZtTz7mhHOdSMz8DLtzIZaeL4grNCYRH/3hOB4x1k5/bhB2A6+q8mC SF81AWTGsGbb4jnYrakKXgN2sTKvqiQ0TJfgYkplDnWBxsJKl4NV18m5LQI8QZHQ aRWNvhl5G3t7fj/RSxgJnuVjUPQYeMZRhKIVhprr0rs4bwcyxH9qG0Rf42W7qODO c8i506aPhqQ8aeTnXUOkUJdcU/Vv5RnvKAJoZAM1bLYWb9DgJOAXyhhoRcbW+QWY oeKyt0HgS1jcDe+AH03+p8P958M6oRgioRIclPjh3a06aXLWampbjx0Dmv/eOlkx zvYnB1z6MwPviQbBQU6/A6N0azICvHRGzQjZ55O1uzF3vQZiAuIgzYQuhtYfBs5P bjACumcS7UZ9B1rxhXZK22JcdkfBaL9jwiCKQjFesnFat/MlMp3k/uc28+bx5tIO LXWicFJRM7sFD2Zg4lvK/Y4CgEVdZOOHN6LKj+tmtYdZ5kmQh1M= =lEbD -----END PGP SIGNATURE----- Merge tag 'reset-gpio-for-v6.19-2' of https://git.pengutronix.de/git/pza/linux into soc/drivers-late Reset/GPIO/swnode changes for v6.19 (v2) * Fix chtwc_int33fe build issue since commitd7cdbbc93c("software node: allow referencing firmware nodes"). * tag 'reset-gpio-for-v6.19-2' of https://git.pengutronix.de/git/pza/linux: platform/x86: intel: chtwc_int33fe: don't dereference swnode args Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
3d892259d1
|
|
@ -77,7 +77,7 @@ static const struct software_node max17047_node = {
|
|||
* software node.
|
||||
*/
|
||||
static struct software_node_ref_args fusb302_mux_refs[] = {
|
||||
{ .node = NULL },
|
||||
SOFTWARE_NODE_REFERENCE(NULL),
|
||||
};
|
||||
|
||||
static const struct property_entry fusb302_properties[] = {
|
||||
|
|
@ -190,11 +190,6 @@ static void cht_int33fe_remove_nodes(struct cht_int33fe_data *data)
|
|||
{
|
||||
software_node_unregister_node_group(node_group);
|
||||
|
||||
if (fusb302_mux_refs[0].node) {
|
||||
fwnode_handle_put(software_node_fwnode(fusb302_mux_refs[0].node));
|
||||
fusb302_mux_refs[0].node = NULL;
|
||||
}
|
||||
|
||||
if (data->dp) {
|
||||
data->dp->secondary = NULL;
|
||||
fwnode_handle_put(data->dp);
|
||||
|
|
@ -202,7 +197,15 @@ static void cht_int33fe_remove_nodes(struct cht_int33fe_data *data)
|
|||
}
|
||||
}
|
||||
|
||||
static int cht_int33fe_add_nodes(struct cht_int33fe_data *data)
|
||||
static void cht_int33fe_put_swnode(void *data)
|
||||
{
|
||||
struct fwnode_handle *fwnode = data;
|
||||
|
||||
fwnode_handle_put(fwnode);
|
||||
fusb302_mux_refs[0] = SOFTWARE_NODE_REFERENCE(NULL);
|
||||
}
|
||||
|
||||
static int cht_int33fe_add_nodes(struct device *dev, struct cht_int33fe_data *data)
|
||||
{
|
||||
const struct software_node *mux_ref_node;
|
||||
int ret;
|
||||
|
|
@ -212,17 +215,25 @@ static int cht_int33fe_add_nodes(struct cht_int33fe_data *data)
|
|||
* until the mux driver has created software node for the mux device.
|
||||
* It means we depend on the mux driver. This function will return
|
||||
* -EPROBE_DEFER until the mux device is registered.
|
||||
*
|
||||
* FIXME: the relevant software node exists in intel-xhci-usb-role-switch
|
||||
* and - if exported - could be used to set up a static reference.
|
||||
*/
|
||||
mux_ref_node = software_node_find_by_name(NULL, "intel-xhci-usb-sw");
|
||||
if (!mux_ref_node)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
ret = devm_add_action_or_reset(dev, cht_int33fe_put_swnode,
|
||||
software_node_fwnode(mux_ref_node));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* Update node used in "usb-role-switch" property. Note that we
|
||||
* rely on software_node_register_node_group() to use the original
|
||||
* instance of properties instead of copying them.
|
||||
*/
|
||||
fusb302_mux_refs[0].node = mux_ref_node;
|
||||
fusb302_mux_refs[0] = SOFTWARE_NODE_REFERENCE(mux_ref_node);
|
||||
|
||||
ret = software_node_register_node_group(node_group);
|
||||
if (ret)
|
||||
|
|
@ -345,7 +356,7 @@ static int cht_int33fe_typec_probe(struct platform_device *pdev)
|
|||
return fusb302_irq;
|
||||
}
|
||||
|
||||
ret = cht_int33fe_add_nodes(data);
|
||||
ret = cht_int33fe_add_nodes(dev, data);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user