Re: [PATCH 3/7] gnss: add generic serial driver

2018-04-25 Thread Johan Hovold
On Wed, Apr 25, 2018 at 11:00:31AM +0200, Greg Kroah-Hartman wrote: > On Tue, Apr 24, 2018 at 06:34:54PM +0200, Johan Hovold wrote: > > +static inline void *gnss_serial_get_drvdata(struct gnss_serial *gserial) > > +{ > > + return [1]; > > +} > > Oh that's the best hack I have seen in a long

Re: [PATCH 3/7] gnss: add generic serial driver

2018-04-25 Thread Johan Hovold
On Wed, Apr 25, 2018 at 11:00:31AM +0200, Greg Kroah-Hartman wrote: > On Tue, Apr 24, 2018 at 06:34:54PM +0200, Johan Hovold wrote: > > +static inline void *gnss_serial_get_drvdata(struct gnss_serial *gserial) > > +{ > > + return [1]; > > +} > > Oh that's the best hack I have seen in a long

Re: [PATCH 3/7] gnss: add generic serial driver

2018-04-25 Thread Johan Hovold
On Wed, Apr 25, 2018 at 10:57:49AM +0200, Greg Kroah-Hartman wrote: > On Tue, Apr 24, 2018 at 06:34:54PM +0200, Johan Hovold wrote: > > Add a generic serial GNSS driver (library) which provides a common > > implementation for the gnss interface and power management (runtime and > > system

Re: [PATCH 3/7] gnss: add generic serial driver

2018-04-25 Thread Johan Hovold
On Wed, Apr 25, 2018 at 10:57:49AM +0200, Greg Kroah-Hartman wrote: > On Tue, Apr 24, 2018 at 06:34:54PM +0200, Johan Hovold wrote: > > Add a generic serial GNSS driver (library) which provides a common > > implementation for the gnss interface and power management (runtime and > > system

Re: [PATCH 3/7] gnss: add generic serial driver

2018-04-25 Thread Greg Kroah-Hartman
On Tue, Apr 24, 2018 at 06:34:54PM +0200, Johan Hovold wrote: > +static inline void *gnss_serial_get_drvdata(struct gnss_serial *gserial) > +{ > + return [1]; > +} Oh that's the best hack I have seen in a long time. I need to remember that one for next time. Anyway, in reading this driver,

Re: [PATCH 3/7] gnss: add generic serial driver

2018-04-25 Thread Greg Kroah-Hartman
On Tue, Apr 24, 2018 at 06:34:54PM +0200, Johan Hovold wrote: > +static inline void *gnss_serial_get_drvdata(struct gnss_serial *gserial) > +{ > + return [1]; > +} Oh that's the best hack I have seen in a long time. I need to remember that one for next time. Anyway, in reading this driver,

Re: [PATCH 3/7] gnss: add generic serial driver

2018-04-25 Thread Greg Kroah-Hartman
On Tue, Apr 24, 2018 at 06:34:54PM +0200, Johan Hovold wrote: > Add a generic serial GNSS driver (library) which provides a common > implementation for the gnss interface and power management (runtime and > system suspend). This allows GNSS drivers for specific chip to be > implemented by simply

Re: [PATCH 3/7] gnss: add generic serial driver

2018-04-25 Thread Greg Kroah-Hartman
On Tue, Apr 24, 2018 at 06:34:54PM +0200, Johan Hovold wrote: > Add a generic serial GNSS driver (library) which provides a common > implementation for the gnss interface and power management (runtime and > system suspend). This allows GNSS drivers for specific chip to be > implemented by simply

[PATCH 3/7] gnss: add generic serial driver

2018-04-24 Thread Johan Hovold
Add a generic serial GNSS driver (library) which provides a common implementation for the gnss interface and power management (runtime and system suspend). This allows GNSS drivers for specific chip to be implemented by simply providing a set_power() callback to handle three states: ACTIVE,

[PATCH 3/7] gnss: add generic serial driver

2018-04-24 Thread Johan Hovold
Add a generic serial GNSS driver (library) which provides a common implementation for the gnss interface and power management (runtime and system suspend). This allows GNSS drivers for specific chip to be implemented by simply providing a set_power() callback to handle three states: ACTIVE,