lkml.org 
[lkml]   [2015]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 3/3] misc: Add w2sg0004 gps receiver driver
From
Date

Am 16.10.2015 um 21:38 schrieb Arnd Bergmann <arnd@arndb.de>:

> On Friday 16 October 2015 21:27:11 H. Nikolaus Schaller wrote:
>> Am 16.10.2015 um 21:06 schrieb Arnd Bergmann <arnd@arndb.de>:
>>
>>> On Friday 16 October 2015 20:08:35 H. Nikolaus Schaller wrote:
>>>> +
>>>> +static int w2sg_data_probe(struct platform_device *pdev)
>>>> +{
>>>> + struct w2sg_pdata *pdata = dev_get_platdata(&pdev->dev);
>>>> + struct w2sg_data *data;
>>>> + struct rfkill *rf_kill;
>>>> + int err;
>>>> +
>>>> + pr_debug("%s()\n", __func__);
>>>> +
>>>> + if (pdev->dev.of_node) {
>>>> + struct device *dev = &pdev->dev;
>>>> + enum of_gpio_flags flags;
>>>> +
>>>> + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
>>>> + if (!pdata)
>>>>
>>>
>>> Why is this a platform_device and not a serio_device?
>>
>> I can't find a struct serio_device. What is that?
>>
>
> Sorry, I meant 'struct serio', see drivers/input/serio/
>
> This is an existing infrastructure that is used for devices attached
> to a dumb serial device (rs232 or 8042/psaux usually). They have
> a user interface for connecting a driver to a port, but you should
> be able to do it all in the kernel as well if DT has the information
> what device is connected.

Ah, I understand. But it is for a different purpose. E.g. making a
serial device (mouse/touch) an input device. So it is a driver sitting
"on top" of tty/uart drivers.

The problem to be solved here is a different one. The only task for
the driver is to do power control of the device. I.e. turn it on by
open("/dev/ttyX") or asserting DTR.

So we are on a much lower level.

Please see also the patch 0/3 I have resent (the BLURB defined
by git --edit-description was apparently eaten by my git send-email).

BR and thanks,
Nikolaus



\
 
 \ /
  Last update: 2015-10-16 22:21    [W:0.130 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site