All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Hans de Goede <j.w.r.degoede@gmail.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	Hans de Goede <hdegoede@redhat.com>,
	dri-devel@lists.freedesktop.org,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH] drm/i915/intel_dsi: Add acpi_gpio_mapping for the panel-enable GPIO
Date: Fri, 29 Jun 2018 14:51:38 +0300	[thread overview]
Message-ID: <20180629115138.GA5565@intel.com> (raw)
In-Reply-To: <20180629113258.16188-1-hdegoede@redhat.com>

On Fri, Jun 29, 2018 at 01:32:58PM +0200, Hans de Goede wrote:
> Add acpi_gpio_mapping for the panel-enable GPIO, this fixes the following
> error: "Failed to own gpio for panel control" on BYT/CHT devices where
> pwm_blc == PPS_BLC_PMIC.
> 
> Note this patch is untested as I don't have hardware to test this,
> but it should fix things.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
> index 3b7acb5a70b3..b2b75ed3cbf9 100644
> --- a/drivers/gpu/drm/i915/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/intel_dsi.c
> @@ -29,6 +29,7 @@
>  #include <drm/drm_edid.h>
>  #include <drm/i915_drm.h>
>  #include <drm/drm_mipi_dsi.h>
> +#include <linux/acpi.h>
>  #include <linux/slab.h>
>  #include <linux/gpio/consumer.h>
>  #include "i915_drv.h"
> @@ -1713,6 +1714,13 @@ static void intel_dsi_add_properties(struct intel_connector *connector)
>  	}
>  }
>  
> +static const struct acpi_gpio_params panel_gpio = { 0, 0, false };
> +
> +static const struct acpi_gpio_mapping panel_gpios[] = {
> +	{ "panel", &panel_gpio, 1 },
> +	{ },
> +};

Named initializers please.

> +
>  void intel_dsi_init(struct drm_i915_private *dev_priv)
>  {
>  	struct drm_device *dev = &dev_priv->drm;
> @@ -1811,6 +1819,7 @@ void intel_dsi_init(struct drm_i915_private *dev_priv)
>  	 */
>  	if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
>  	    (dev_priv->vbt.dsi.config->pwm_blc == PPS_BLC_PMIC)) {
> +		devm_acpi_dev_add_driver_gpios(dev->dev, panel_gpios);

Some explanation on what this actually does would be nice. There is no
documentation that I can see so it's totally unclear why this is needed.

Also IIRC this gpio comes straight from the pmic driver and not from
acpi. So I don't really understand why acpi stuff must be involved here.

ccing Andy for a clue...

>  		intel_dsi->gpio_panel =
>  			gpiod_get(dev->dev, "panel", GPIOD_OUT_HIGH);
>  
> -- 
> 2.17.1

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-06-29 11:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-29 11:32 [PATCH] drm/i915/intel_dsi: Add acpi_gpio_mapping for the panel-enable GPIO Hans de Goede
2018-06-29 11:51 ` Ville Syrjälä [this message]
2018-06-29 12:05   ` Hans de Goede
2018-06-29 12:10     ` Ville Syrjälä
2018-06-29 12:28       ` Hans de Goede
2018-06-29 16:12   ` Andy Shevchenko
2018-06-29 14:15 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-06-29 15:40 ` ✓ Fi.CI.IGT: " Patchwork

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=20180629115138.GA5565@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=j.w.r.degoede@gmail.com \
    --cc=rodrigo.vivi@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.