All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Alexandre Courbot <acourbot@nvidia.com>,
	linux-gpio@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	David Cohen <david.a.cohen@intel.com>,
	Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH v4 2/2] gpiolib: append SFI helpers for GPIO API
Date: Mon, 9 Dec 2013 15:04:39 +0200	[thread overview]
Message-ID: <20131209130439.GE2281@intel.com> (raw)
In-Reply-To: <1386589829-2877-3-git-send-email-andriy.shevchenko@linux.intel.com>

On Mon, Dec 09, 2013 at 01:50:29PM +0200, Andy Shevchenko wrote:
> diff --git a/drivers/gpio/gpiolib-sfi.c b/drivers/gpio/gpiolib-sfi.c
> new file mode 100644
> index 0000000..43db749
> --- /dev/null
> +++ b/drivers/gpio/gpiolib-sfi.c
> @@ -0,0 +1,28 @@
> +/*
> + * Simple Firmware Interface (SFI) helpers for GPIO API
> + *
> + * Copyright (C) 2013, Intel Corporation
> + * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include <linux/gpio/consumer.h>
> +#include <linux/sfi.h>
> +#include <linux/errno.h>
> +#include <linux/err.h>
> +
> +#include "gpiolib.h"
> +
> +struct gpio_desc *sfi_get_gpiod_by_name(const char *name)
> +{
> +	struct sfi_gpio_table_entry *pentry;
> +
> +	pentry = sfi_gpio_get_entry_by_name(name);
> +	if (IS_ERR(pentry))
> +		return pentry;
> +
> +	return gpio_to_desc(pentry->pin_no);
> +}

Do you really need add a new file just to have the above supported? I mean
that if you place that function to drivers/gpio/gpiolib.c with the
appropriate:

#ifdef CONFIG_SFI
#else
#endif

you can get rid of that file (and Kconfig + Makefile changes) completely,
no?

  reply	other threads:[~2013-12-09 12:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09 11:50 [PATCH v4 0/2] gpiolib, sfi: introduce SFI GPIO helpers Andy Shevchenko
2013-12-09 11:50 ` [PATCH v4 1/2] SFI: store GPIO table and export lookup function Andy Shevchenko
2013-12-09 11:50 ` [PATCH v4 2/2] gpiolib: append SFI helpers for GPIO API Andy Shevchenko
2013-12-09 13:04   ` Mika Westerberg [this message]
2013-12-09 13:02     ` Andy Shevchenko
2013-12-09 13:27       ` Linus Walleij
2013-12-09 13:32         ` Andy Shevchenko
2013-12-09 14:15           ` Linus Walleij
2013-12-09 14:22             ` Andy Shevchenko
2013-12-10  2:46         ` Alex Courbot

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=20131209130439.GE2281@intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=acourbot@nvidia.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=david.a.cohen@intel.com \
    --cc=lenb@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=sathyanarayanan.kuppuswamy@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.