All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: linux-iio@vger.kernel.org,
	Patrice Vilchez <patrice.vilchez@atmel.com>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Subject: Re: [PATCH 5/6] AT91: IIO: cosmetic fixes, better error messages
Date: Mon, 12 Dec 2011 21:30:14 +0000	[thread overview]
Message-ID: <4EE67266.1050508@kernel.org> (raw)
In-Reply-To: <4EE5E104.3070206@free-electrons.com>

On 12/12/2011 11:09 AM, Maxime Ripard wrote:
> Hi Jonathan,
> 
> Ok, I will merge this patch with the other patchset and resend a version
> of the other patchset.
> 
> I suppose you also want the fourth patch merged ?
If they aren't how you would have written it from scratch, then yes
please (the answer that saves me reading that patch - daughter doing 30
second count down for a story ;)
> 
> Maxime
> 
> On 10/12/2011 15:44, Jonathan Cameron wrote:
>> All sensible but given I haven't merged anything (as being slow with
>> both trees just now), I'd rather see these pushed down into the
>> various places they were first created...
>>
>> Jonathan
>>
>> On 12/07/2011 06:25 PM, Maxime Ripard wrote:
>>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>>>
>>> Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
>>> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
>>> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>>> ---
>>>  drivers/staging/iio/adc/at91_adc.c |   34 +++++++++++++++++++---------------
>>>  1 files changed, 19 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/drivers/staging/iio/adc/at91_adc.c b/drivers/staging/iio/adc/at91_adc.c
>>> index 4a0421e..9d6e351 100644
>>> --- a/drivers/staging/iio/adc/at91_adc.c
>>> +++ b/drivers/staging/iio/adc/at91_adc.c
>>> @@ -42,16 +42,16 @@ struct at91_adc_desc {
>>>  };
>>>  
>>>  struct at91_adc_state {
>>> -	struct clk *clk;
>>> -	bool done;
>>> -	struct mutex lock;
>>> -	int irq;
>>> -	wait_queue_head_t wq_data_avail;
>>> -	u16 last_value;
>>> -	void __iomem *reg_base;
>>> -	unsigned int vref_mv;
>>> -	unsigned long channels_mask;
>>> -	struct at91_adc_desc *desc;
>>> +	u32			channels_mask;
>>> +	struct clk		*clk;
>>> +	bool			done;
>>> +	struct at91_adc_desc	*desc;
>>> +	int			irq;
>>> +	u16			last_value;
>>> +	struct mutex		lock;
>>> +	void __iomem		*reg_base;
>>> +	u32			vref_mv;
>>> +	wait_queue_head_t	wq_data_avail;
>>>  };
>>>  
>>>  static struct at91_adc_desc at91_adc_desc_sam9g20 = {
>>> @@ -103,7 +103,7 @@ static irqreturn_t at91_adc_eoc_trigger(int irq, void *private)
>>>  }
>>>  
>>>  static int at91_adc_channel_init(struct iio_dev *idev,
>>> -				struct at91_adc_data *pdata)
>>> +				 struct at91_adc_data *pdata)
>>>  {
>>>  	struct at91_adc_state *st = iio_priv(idev);
>>>  	struct iio_chan_spec *chan_array;
>>> @@ -139,8 +139,8 @@ static void at91_adc_channel_remove(struct iio_dev *idev)
>>>  }
>>>  
>>>  static int at91_adc_read_raw(struct iio_dev *idev,
>>> -			    struct iio_chan_spec const *chan,
>>> -			    int *val, int *val2, long mask)
>>> +			     struct iio_chan_spec const *chan,
>>> +			     int *val, int *val2, long mask)
>>>  {
>>>  	struct at91_adc_state *st = iio_priv(idev);
>>>  	int ret;
>>> @@ -310,8 +310,10 @@ static int __devinit at91_adc_probe(struct platform_device *pdev)
>>>  
>>>  	/* Setup the ADC channels available on the board */
>>>  	ret = at91_adc_channel_init(idev, pdata);
>>> -	if (ret < 0)
>>> +	if (ret < 0) {
>>> +		dev_err(&pdev->dev, "Couldn't initialize the channels.\n");
>>>  		goto error_free_clk;
>>> +	}
>>>  
>>>  	init_waitqueue_head(&st->wq_data_avail);
>>>  	mutex_init(&st->lock);
>>> @@ -320,8 +322,10 @@ static int __devinit at91_adc_probe(struct platform_device *pdev)
>>>  	st->channels_mask = pdata->channels_used;
>>>  
>>>  	ret = iio_device_register(idev);
>>> -	if (ret < 0)
>>> +	if (ret < 0) {
>>> +		dev_err(&pdev->dev, "Couldn't register the device.\n");
>>>  		goto error_free_channels;
>>> +	}
>>>  
>>>  	return 0;
>>>  
>>
> 
> 


  reply	other threads:[~2011-12-12 21:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07 18:25 [RFC v2] IIO: Add hardware triggers support to the AT91 ADC driver Maxime Ripard
2011-12-07 18:25 ` [PATCH 1/6] ARM: AT91: Add platform data for the ADCs Maxime Ripard
2011-12-07 18:25 ` [PATCH 2/6] ARM: AT91: IIO: Add AT91 ADC driver Maxime Ripard
2011-12-07 18:25 ` [PATCH 3/6] ARM: AT91: Add the ADC to the sam9g20ek board Maxime Ripard
2011-12-07 18:25 ` [PATCH 4/6] AT91: IIO: Move the SoC specific informations to the ADC driver Maxime Ripard
2011-12-07 18:25 ` [PATCH 5/6] AT91: IIO: cosmetic fixes, better error messages Maxime Ripard
2011-12-10 14:44   ` Jonathan Cameron
2011-12-12 11:09     ` Maxime Ripard
2011-12-12 21:30       ` Jonathan Cameron [this message]
2011-12-07 18:25 ` [PATCH 6/6] AT91: IIO: Add support for hardware triggers for the ADC Maxime Ripard
2011-12-10 15:24   ` Jonathan Cameron
2011-12-12 13:55     ` Maxime Ripard
2011-12-12 21:29       ` Jonathan Cameron
2011-12-13 13:33         ` Maxime Ripard
2011-12-07 18:28 ` [RFC v2] IIO: Add hardware triggers support to the AT91 ADC driver Maxime Ripard
2011-12-12 15:09   ` Maxime Ripard
2011-12-12 21:14     ` Jonathan Cameron
2011-12-16 17:49       ` Maxime Ripard
2011-12-19  8:41         ` archive

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=4EE67266.1050508@kernel.org \
    --to=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=nicolas.ferre@atmel.com \
    --cc=patrice.vilchez@atmel.com \
    --cc=thomas.petazzoni@free-electrons.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.