[LinuxPPS] GPIO PPS Generator

Igor Plyatov plyatov at gmail.com
Tue May 21 16:26:26 CEST 2013


Hi Drasko!

> Hi Igor,
> I am trying to add the files you sent.  However, I can see now that
> pps-generator-gpio.c includes corresponding header file, and you
> forgot so send it, so the compilation fails (fatal error:
> linux/pps-generator-gpio.h: No such file or directory).
>
> Do you have this file at your disposal?

File is attached.

Here is an example from BSP, which shows how to setup platform data for 
the driver.

...
#include <linux/pps-generator-gpio.h>
...
static struct pps_generator_gpio_platform_data pps_generator_gpios_data = {
     .gpio            = AT91_PIN_PB20,
     .desc            = "pps0 generator"
};

static struct platform_device pps_generator_gpio_device = {
     .name        = "pps-gen-gpio",
     .id        = 0,
     .dev        = {
         .platform_data    = &pps_generator_gpios_data,
     }
};
...
static void __init gsia18s_board_init(void)
{
...
     platform_device_register(&pps_generator_gpio_device);
...

Best regards!
--
Igor Plyatov

> BR,
> Drasko
>
>
> On Fri, May 17, 2013 at 7:41 PM, Igor Plyatov <plyatov at gmail.com> wrote:
>> Sorry, but I do not understand what you mean. Can you be more specific -
>> acceptable for what?
>>
>> 17.05.2013 18:59 пользователь "Drasko DRASKOVIC"
>> <drasko.draskovic at gmail.com> написал:
>>
>>> Hi Igor,
>>> thanks a lot.
>>>
>>>
>>> On Fri, May 17, 2013 at 4:36 PM, Igor Plyatov <plyatov at gmail.com> wrote:
>>>> Dear guys,
>>>>
>>>> here is an experimental driver for GPIO pps generator attached.
>>>>
>>>> It was made from pps_gen_parport.c by me and tested with Linux 2.6.39.3.
>>>>
>>>> Of course it have some drawbacks, but can be improved by yours if
>>>> needed.
>>>>
>>>> Unfortunately I don't have time to improve it now.
>>>>
>>>> Good luck and best regards!
>>> I will certainly look at i and test it.
>>>
>>> As I understand simple GPIO toggle for userspace is out of question,
>>> because of OS jitter.
>>>
>>> But would simple GPIO toggel from kernel space be acceptible,
>>> something like this :
>>> https://github.com/mirko/gpio-toggling---linux-kernel-module ?
>>>
>>> BR,
>>> Drasko


-- 
Igor Plyatov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pps-generator-gpio.h
Type: text/x-chdr
Size: 1010 bytes
Desc: not available
URL: <http://www.linuxpps.org/pipermail/discussions/attachments/20130521/58d8bc47/attachment-0002.h>


More information about the discussions mailing list