Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1723349

Re: [PATCH v3 05/11] staging: typec: fusb302: Use client->irq as irq if set

From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject Re: [PATCH v3 05/11] staging: typec: fusb302: Use client->irq as irq if set
Date 2017-08-30 16:00 +0200
Message-ID <ukbHb-yr-9@gated-at.bofh.it> (permalink)
References <uk7Ng-6DT-3@gated-at.bofh.it> <uk7WW-6Hb-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/30/2017 02:48 AM, Hans de Goede wrote:
> The fusb302 is also used on x86 systems where the platform code sets
> the irq in client->irq and there is no gpio named fcs,int_n.
> 
> Cc: "Yueyao (Nathan) Zhu" <yueyao@google.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/staging/typec/fusb302/fusb302.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/typec/fusb302/fusb302.c b/drivers/staging/typec/fusb302/fusb302.c
> index 1c1751c994db..675161cf4f3a 100644
> --- a/drivers/staging/typec/fusb302/fusb302.c
> +++ b/drivers/staging/typec/fusb302/fusb302.c
> @@ -1735,9 +1735,13 @@ static int fusb302_probe(struct i2c_client *client,
>   		goto destroy_workqueue;
>   	}
>   
> -	ret = init_gpio(chip);
> -	if (ret < 0)
> -		goto destroy_workqueue;
> +	if (client->irq) {
> +		chip->gpio_int_n_irq = client->irq;
> +	} else {
> +		ret = init_gpio(chip);
> +		if (ret < 0)
> +			goto destroy_workqueue;
> +	}
>   
>   	chip->tcpm_port = tcpm_register_port(&client->dev, &chip->tcpc_dev);
>   	if (IS_ERR(chip->tcpm_port)) {
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 00/11] Hookup typec power-negotation to the PMIC and charger Hans de Goede <hdegoede@redhat.com> - 2017-08-30 11:50 +0200
  [PATCH v3 04/11] staging: typec: fusb302: Get max snk mv/ma/mw from device-properties Hans de Goede <hdegoede@redhat.com> - 2017-08-30 11:50 +0200
    Re: [PATCH v3 04/11] staging: typec: fusb302: Get max snk mv/ma/mw  from device-properties Guenter Roeck <linux@roeck-us.net> - 2017-08-30 16:00 +0200
  [PATCH v3 07/11] staging: typec: fusb302: Export current-limit through a power_supply class dev Hans de Goede <hdegoede@redhat.com> - 2017-08-30 12:00 +0200
    Re: [PATCH v3 07/11] staging: typec: fusb302: Export current-limit  through a power_supply class dev Guenter Roeck <linux@roeck-us.net> - 2017-08-30 16:10 +0200
  [PATCH v3 01/11] i2c: Allow overriding dev_name through board_info Hans de Goede <hdegoede@redhat.com> - 2017-08-30 12:00 +0200
  [PATCH v3 05/11] staging: typec: fusb302: Use client->irq as irq if set Hans de Goede <hdegoede@redhat.com> - 2017-08-30 12:00 +0200
    Re: [PATCH v3 05/11] staging: typec: fusb302: Use client->irq as irq  if set Guenter Roeck <linux@roeck-us.net> - 2017-08-30 16:00 +0200
  [PATCH v3 03/11] staging: typec: fusb302: Set max supply voltage to 5V Hans de Goede <hdegoede@redhat.com> - 2017-08-30 12:00 +0200
    Re: [PATCH v3 03/11] staging: typec: fusb302: Set max supply voltage  to 5V Guenter Roeck <linux@roeck-us.net> - 2017-08-30 15:40 +0200
  Re: [PATCH v3 00/11] Hookup typec power-negotation to the PMIC and  charger Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-31 18:30 +0200

csiph-web