pinctrl: scmi: add blocklist
i.MX95 will have its own pinctrl scmi driver, so need block pinctrl-scmi driver for i.MX95, otherwise there will be two pinctrl devices for a single scmi protocol@19. Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> Link: https://lore.kernel.org/r/20240521-pinctrl-scmi-imx95-v1-2-9a1175d735fd@nxp.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
997f2cdea3
commit
dbd47012a4
@ -11,6 +11,7 @@
|
|||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/mod_devicetable.h>
|
#include <linux/mod_devicetable.h>
|
||||||
|
#include <linux/of.h>
|
||||||
#include <linux/scmi_protocol.h>
|
#include <linux/scmi_protocol.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
@ -504,6 +505,11 @@ static int pinctrl_scmi_get_pins(struct scmi_pinctrl *pmx,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char * const scmi_pinctrl_blocklist[] = {
|
||||||
|
"fsl,imx95",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
static int scmi_pinctrl_probe(struct scmi_device *sdev)
|
static int scmi_pinctrl_probe(struct scmi_device *sdev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -515,6 +521,9 @@ static int scmi_pinctrl_probe(struct scmi_device *sdev)
|
|||||||
if (!sdev->handle)
|
if (!sdev->handle)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (of_machine_compatible_match(scmi_pinctrl_blocklist))
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
handle = sdev->handle;
|
handle = sdev->handle;
|
||||||
|
|
||||||
pinctrl_ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_PINCTRL, &ph);
|
pinctrl_ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_PINCTRL, &ph);
|
||||||
|
Loading…
Reference in New Issue
Block a user