Thread (36 messages) 36 messages, 7 authors, 2011-12-07

[RFC PATCH 1/3] pinctrl: imx: add pinmux imx core driver

From: Shawn Guo <hidden>
Date: 2011-12-06 09:29:35
Also in: lkml

On Sun, Dec 04, 2011 at 07:49:42PM +0800, Dong Aisheng wrote:
quoted hunk ↗ jump to hunk
+static struct pinmux_ops imx_pmx_ops = {
+	.list_functions = imx_pmx_list_funcs,
+	.get_function_name = imx_pmx_get_func_name,
+	.get_function_groups = imx_pmx_get_groups,
+	.enable = imx_pmx_enable,
+};
The pinmux core code will check the pinmux_ops as below.  !ops->disable
is one of the checking, while you do not have .disable hook.

int pinmux_check_ops(const struct pinmux_ops *ops)
{
        /* Check that we implement required operations */
        if (!ops->list_functions ||
            !ops->get_function_name ||
            !ops->get_function_groups ||
            !ops->enable ||
            !ops->disable)
                return -EINVAL;

        return 0;
}

[...]
quoted hunk ↗ jump to hunk
+static int __init imx_pmx_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct imx_pmx *ipmx;
+	struct resource *res;
+	struct imx_pinctrl_info *info;
+	resource_size_t res_size;
+
+	info = (struct imx_pinctrl_info *)pdev->id_entry->driver_data;
+	if (!info || !info->pins || !info->groups || !info->functions
+		|| (info->maxpin > info->npins)) {
You must mean !(info->maxpin > info->npins) here?

Regards,
Shawn
quoted hunk ↗ jump to hunk
+		dev_err(&pdev->dev, "wrong pinctrl info\n");
+		return -EINVAL;
+	}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help