linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Ben Dooks <ben@simtec.co.uk>
Cc: Simtec Linux Team <linux@simtec.co.uk>,
	linux-samsung-soc@vger.kernel.org,
	Arnaud Patard <arnaud.patard@rtp-net.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-input@vger.kernel.org
Subject: Re: [patch 1/1] TOUCHSCREEN: S3C24XX touchscreen driver from Arnaud Patard.
Date: Thu, 19 Nov 2009 09:14:23 -0800	[thread overview]
Message-ID: <20091119171423.GD15647@core.coreip.homeip.net> (raw)
In-Reply-To: <4B052D50.2070002@simtec.co.uk>

On Thu, Nov 19, 2009 at 11:34:40AM +0000, Ben Dooks wrote:
> Dmitry Torokhov wrote:
>
>>> +
>>> +static char *s3c2410ts_name = "s3c2410 TouchScreen";

Btw, "static char s3c2410ts_name[]" will save you a pointer. But, it
looks like it is used only once, in probe(), so just put it there.

>>> +
>>> +/* Per-touchscreen data. */
>>> +
>>> +/**
>>> + * struct s3c2410ts - driver touchscreen state.
>>> + * @client: The ADC client we registered with the core driver.
>>> + * @dev: The device we are bound to.
>>> + * @input: The input device we registered with the input subsystem.
>>> + * @clock: The clock for the adc.
>>> + * @io: Pointer to the IO base.
>>> + * @xp: The accumulated X position data.
>>> + * @yp: The accumulated Y position data.
>>> + * @irq_tc: The interrupt number for pen up/down interrupt
>>> + * @count: The number of samples collected.
>>> + * @shift: The log2 of the maximum count to read in one go.
>>> + */
>>
>> These sructures are driver-internal and so don't need to be kernel-doc-ed.
>> Same goes for the driver-private functions.
>
> I like having the documentation, and I would much prefer to leave it
> in as useful.
>

Ah, I wasn't requiesting to remove the documentation, I was just saying
that since these data structures and fucntions are driver-provate they
don't need to use kernel-doc style.

>>> +
>>> +		input_report_key(ts.input, BTN_TOUCH, 1);
>>> +		input_report_abs(ts.input, ABS_PRESSURE, 1);
>>
>> No fake pressure events please, BTN_TOUCH should be enough.
>
> I'd have to check, IIRC tslib needs these to function properly.
>

Just update your tslib, the issue was fixed there last November.

>>> +{
>>> +	struct s3c2410_ts_mach_info *info;
>>> +	struct device *dev = &pdev->dev;
>>> +	struct input_dev *input_dev;
>>> +	struct resource *res;
>>> +	int ret = -EINVAL;
>>
>> Can we call it "error" (since that's what you use it for).
>
> Is it really necessary to change this?
>

No, it is my personal preference/style. In case when it is used like:

	var = blah();
	if (var)
		goto err_unblah;

	return 0;

err_unblah:
	unblah();
	return var;
}

I prefer that var called 'error'. If the value is returned on both error
and success paths then I call it 'ret', 'retval', etc.

But no, if you prefer 'ret' that is fine too.

>>
>>> +	.suspend	= s3c2410ts_suspend,
>>> +	.resume		= s3c2410ts_resume,
>>
>> Switch to pm_ops.
>
> ok, will do. may as well remove the #ifdef CONFIG_PM
> for such small amount of code too.
>

As long as it does not break when CONFIG_PM is not set...

-- 
Dmitry

  parent reply	other threads:[~2009-11-19 17:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20091118232939.201290297@fluff.org.uk>
2009-11-18 23:29 ` [patch 1/1] TOUCHSCREEN: S3C24XX touchscreen driver from Arnaud Patard Ben Dooks
2009-11-19  1:45   ` Ramax Lo
2009-11-19  2:59   ` Dmitry Torokhov
2009-11-19  5:47     ` Harald Welte
2009-11-19  6:15     ` Shine Liu
2009-11-19 11:34     ` Ben Dooks
2009-11-19 13:52       ` Daniel Silverstone
2009-11-19 17:03         ` Dmitry Torokhov
2009-11-19 17:12           ` Russell King - ARM Linux
2009-11-19 17:48           ` Ben Dooks
2009-11-19 17:14       ` Dmitry Torokhov [this message]
2009-11-27  7:31         ` Pavel Machek
2009-11-19  5:46   ` Shine Liu
2009-11-19 10:37     ` Mark Brown
2009-11-19 12:06       ` Ben Dooks
2009-11-19  8:04   ` Vasily Khoruzhick

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=20091119171423.GD15647@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=arnaud.patard@rtp-net.org \
    --cc=ben@simtec.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@simtec.co.uk \
    /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;
as well as URLs for NNTP newsgroup(s).