mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Guo <shawn.guo@freescale.com>
To: Dong Aisheng <b29396@freescale.com>
Cc: <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linus.walleij@stericsson.com>, <s.hauer@pengutronix.de>,
	<kernel@pengutronix.de>
Subject: Re: [RFC PATCH 1/3] pinctrl: imx: add pinmux imx core driver
Date: Tue, 6 Dec 2011 17:42:04 +0800	[thread overview]
Message-ID: <20111206094203.GC3864@S2100-06.ap.freescale.net> (raw)
In-Reply-To: <1322999384-7886-1-git-send-email-b29396@freescale.com>

On Sun, Dec 04, 2011 at 07:49:42PM +0800, Dong Aisheng wrote:
> +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;
}

[...]

> +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

> +		dev_err(&pdev->dev, "wrong pinctrl info\n");
> +		return -EINVAL;
> +	}


  parent reply	other threads:[~2011-12-06  9:29 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-04 11:49 Dong Aisheng
2011-12-04 11:49 ` [RFC PATCH 2/3] pinctrl: imx: add pinmux-imx53 support Dong Aisheng
2011-12-04 16:11   ` Sascha Hauer
2011-12-05  2:43     ` Dong Aisheng
2011-12-05  7:51       ` Sascha Hauer
2011-12-06  3:21         ` Dong Aisheng-B29396
2011-12-05 17:03       ` Linus Walleij
2011-12-05 17:01     ` Linus Walleij
2011-12-06  3:42       ` Dong Aisheng-B29396
2011-12-05 16:57   ` Linus Walleij
2011-12-05 21:18     ` Sascha Hauer
2011-12-06  5:54       ` Dong Aisheng-B29396
2011-12-06  6:58         ` Shawn Guo
2011-12-06  7:21           ` Dong Aisheng-B29396
2011-12-06  6:25       ` Shawn Guo
2011-12-06  7:33         ` Lothar Waßmann
2011-12-06  8:00           ` Shawn Guo
2011-12-06  8:05           ` Uwe Kleine-König
2011-12-07  9:01           ` Linus Walleij
2011-12-06 10:53         ` Sascha Hauer
2011-12-06  3:39     ` Dong Aisheng
2011-12-04 11:49 ` [RFC PATCH 3/3] pinctrl: imx: add pinmux-imx6q support Dong Aisheng
2011-12-06  7:23   ` Shawn Guo
2011-12-06  7:23     ` Dong Aisheng-B29396
2011-12-06 14:44       ` Shawn Guo
2011-12-07  9:09       ` Linus Walleij
2011-12-07  9:18         ` Dong Aisheng-B29396
2011-12-05 13:09 ` [RFC PATCH 1/3] pinctrl: imx: add pinmux imx core driver Linus Walleij
2011-12-06  3:41   ` Dong Aisheng-B29396
2011-12-06  7:06 ` Shawn Guo
2011-12-06  7:13   ` Dong Aisheng-B29396
2011-12-06  7:32     ` Shawn Guo
2011-12-06  7:39 ` Shawn Guo
2011-12-06  7:35   ` Dong Aisheng-B29396
2011-12-06  9:42 ` Shawn Guo [this message]
2011-12-06  9:38   ` Dong Aisheng-B29396

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111206094203.GC3864@S2100-06.ap.freescale.net \
    --to=shawn.guo@freescale.com \
    --cc=b29396@freescale.com \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®