Commit Graph

13 Commits

Author SHA1 Message Date
Greg Kroah-Hartman 8d5732f4be greybus: pwm: use the bundle struct device instead of the connector
We are removing struct device from the gb_connection structure in the
near future.  The gb_bundle structure's struct device should be used as
a replacement.

This patch moves the pwm driver to use the bundle pointer instead of the
connection pointer.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Alex Elder <elder@linaro.org>
2015-10-15 09:19:15 -07:00
Johan Hovold 2630fbf828 greybus: pwm: replace pr_err with dev_err
Replace pr_err with the more descriptive dev_err. Also include the error
code on failure to register the PWM chip.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
2015-09-02 10:48:31 +02:00
Viresh Kumar 2e93d02c18 greybus: pwm: Drop get_version support
This is done from a common place now, no need to replicate it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-08-11 19:33:05 -07:00
Viresh Kumar 3fb97e43ba greybus: pwm: Use (already defined) major/minor macros
We already have macros for these, use them instead of writing fixed
values.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-08-10 17:40:46 -07:00
Viresh Kumar e18822e3d0 greybus: Rename gb_gpbridge_protocol_driver() as gb_builtin_protocol_driver()
This macro is also required by core protocols like control and svc, and
hence the 'gpbridge' name doesn't fit anymore.

Lets call this macro gb_builtin_protocol_driver().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-07-01 16:34:55 -07:00
Alex Elder e9385e5d5a greybus: include "gpbridge.h" from "greybus.h"
Avoid the need for all the source files to include "gpbridge.h"
by just having "greybus.h" include it.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-23 16:34:39 -07:00
Viresh Kumar bdac599c70 greybus: Use gb_gpbridge_protocol_init()
Start using gb_gpbridge_protocol_init() in gpbridge drivers.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-20 22:44:37 -07:00
John Stultz 453bbea807 greybus: Move briged phy structure definitions into gpbridge.h
In order to facilitate re-use of the gpio, i2c, pwm and i2s
structures, split them out of independent files and add
them into a shared gpbridge.h

This will be a prereq to sharing these headers w/ gbsim.

Cc: Alex Elder <alex.elder@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@google.com>
CC: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-04-10 11:17:20 +02:00
Johan Hovold b41caa99a2 greybus: pwm: fix config-request alignment
Fix alignment of the duty and period-fields in the config request,
which should follow the which-field without any inserted padding.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2015-03-17 22:34:43 +01:00
Johan Hovold 6a80ed4d2c greybus: pwm: fix memory leak in error path
Fix memory leak in connection_init error path.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2015-03-17 22:32:58 +01:00
Viresh Kumar 89210f64ba greybus: remove unused version-response structs
These aren't used anymore and so can be removed.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2015-01-22 11:29:39 +08:00
Viresh Kumar 36e79dec96 greybus: create get_version() routines with the help of a macro
This gets rid of lots of duplication of code.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2015-01-22 11:29:39 +08:00
Viresh Kumar 5357cf3231 greybus: Remove "-gb" suffix from .c files
Some files are prefixed with "gb-" and some are suffixed with "-gb". The
rationale behind the first one is that the modules would be named so, i.e.
gb-*.ko. But there is no reason to keep the "-gb" suffix in the second case.

Remove the unnecessary suffix.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2015-01-22 11:27:20 +08:00