aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/vibrator.c
AgeCommit message (Collapse)Author
2017-08-20Staging: greybus: vibrator.c: Fixed alignment to match open parenthesis.Srishti Sharma
Fixed alignment so that it matched open parenthesis Signed-off-by: Srishti Sharma <srishtishar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: greybus: fix "line over 80 characters" coding style issuesGioh Kim
This patch fixes only obvious lines. There are still more issues. Signed-off-by: Gioh Kim <gi-oh.kim@profitbricks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-19staging: greybus: vibrator: remove KERNEL_VERSION checksGreg Kroah-Hartman
No need to support older kernel versions in the Greybus Vibrator driver, so remove the checks as needed, we can now rely on all of the correct driver core apis being present. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-08-18greybus: Add workqueue to handle vibrator timeoutAnn Chen
In the beginning, module side can control the vibrator timeout value, it can disable vibrator until timeout. But after Runtime PM control added in, AP side didn't know when module can be suspended, the vibrator task will be interrupted by suspending event. Because of this problem, the module can not be in charge of counting down the timeout value, it is now up to the AP to manage this. So add workqueue to handle the vibrator timeout. Signed-off-by: Ann Chen <chen_ann@projectara.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-07-22greybus: vibrator: integrate runtime pmAnn Chen
Integrate greybus drivers with the Linux Kernel RuntimePM framework for vibrator driver. Testing Done: AP side (kernel) can control the vibrator driver with suspend and resume. Signed-off-by: Ann Chen <chen_ann@projectara.com> Reviewed-by: David Lin <dtwlin@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-05-31greybus: Remove unused VERSION specific macrosViresh Kumar
We don't use these anymore. Drop them. Note that some macro's specific to bridged PHY devices aren't removed in the patch, as gbsim will break otherwise. They will be removed separately. Compile tested. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-03-22greybus: convert drivers to use connection->private set/getGreg Kroah-Hartman
This converts all drivers to use the gb_connection_get_data() and gb_connection_set_data() functions to make it a bit more explicit as to what is going on. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-21greybus: vibrator: convert to bundle driverJohan Hovold
Convert the legacy vibrator protocol driver to a bundle driver. Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-10-15greybus: vibrator: use the bundle struct device instead of the connectorGreg Kroah-Hartman
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 vibrator 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-14greybus: vibrator: add missing protocol-register error handlingJohan Hovold
Add missing error handling when registering the vibrator protocol during module init. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-09-14greybus: vibrator: fix tear-down raceJohan Hovold
Do not release the minor number until after the device has been deregistered. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-08-11greybus: vibrator: Drop get_version supportViresh Kumar
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-10greybus: vibrator: Use (already defined) major/minor macrosViresh Kumar
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-07-08greybus: properly cleanup ida and idr structures when shutting downGreg Kroah-Hartman
idr and ida structures have internal memory allocated that needs to be freed when modules are removed. So call the proper idr_destroy() or ida_destroy() functions on the module exit path to free the memory. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
2015-05-14greybus: vibrator: convert idr to be an idaGreg Kroah-Hartman
All we need is a simple ida, so use that interface instead of the more "complex" idr one. Bonus is we don't need to fix the locking issue I forgot about when using an idr, as ida has one built-in. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
2015-05-07greybus: eliminate extra response flag definitionsAlex Elder
All protocols use the same value to distinguish between request and response message types. This is a requirement. Use GB_MESSAGE_TYPE_RESPONSE rather than GB_OPERATION_TYPE_RESPONSE for the name of the flag used to distiguish between request and response messages. Get rid of the redundant response flag definitions that are associated with specific protocols. Describe the symbolic values as "operation types" rather than "message types" where they are defined. The message type for a request is the same as the operation type; the message type for a response is the operation type OR'd with GB_MESSAGE_TYPE_RESPONSE. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-03-24greybus: Greybus: Place module_init/exit() right after respective routinesViresh Kumar
As mentioned in kernel coding guidelines. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2015-03-17greybus: vibrator: fix memory leak in error pathJohan Hovold
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-01-22greybus: remove unused version-response structsViresh Kumar
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-22greybus: create get_version() routines with the help of a macroViresh Kumar
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-22greybus: Remove "gb-" prefix from .c filesViresh Kumar
Some files are still prefixed with "gb-" with the reasoning that the modules would be named so, i.e. gb-*.ko. But this can be done by playing a bit in Makefile instead and keep uniform naming of .c files. Lets try it. 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>