- 14 Jan, 2016 1 commit
-
-
Mark Greer authored
For consistency with most other files in the Greybus repository, change 'audio-codec.c' to use an underscore instead of a hyphen in its name. Signed-off-by:
Mark Greer <mgreer@animalcreek.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
- 13 Jan, 2016 11 commits
-
-
Vaibhav Hiremath authored
It makes more sense to enable the clock after power is enabled to the device, so move clock enable code after regulator_enable and setting up BOOT_RET pin. Signed-off-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Tested-by:
Michael Scott <michael.scott@linaro.org> Reviewed-by:
Laurent Pinchart <laurent.pinchart@linaro.org> Tested-by:
Laurent Pinchart <laurent.pinchart@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Gjorgji Rosikopulos authored
This change implements gb camera interface and register gb camera to the HOST driver. This implementation need to be reworked after the demo. Tested with db3 with two camera modules. Signed-off-by:
Gjorgji Rosikopulos <grosikopulos@mm-sol.com> Acked-by:
Laurent Pinchart <laurent.pinchart@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Gjorgji Rosikopulos authored
Gb camera need to communicate with HOST driver. as temporary solution there will be shared header between gb camera HOST camera. Both need to be in sync since gb drivers are compiled out of the kernel tree. Gb camera register camera operation functions when is created. Currently unregister is not supported. Signed-off-by:
Gjorgji Rosikopulos <grosikopulos@mm-sol.com> Acked-by:
Laurent Pinchart <laurent.pinchart@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Rui Miguel Silva authored
In kernel v4.5 there is a change in LED api, which remove the need for individual work queue and rename the set_sync operation to set_blocking. This patch add the handling of this case and avoid compilation failure for this kernel versions. Signed-off-by:
Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Rui Miguel Silva authored
In v4.5 the LED API is changed related to the set brightness operations, set_sync is removed and the workqueue handling is now done by leds core, so no need for individual drivers to have one. This will be done by removing the SET_SYNC macro and add a new SET_BLOCKING. Signed-off-by:
Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Greg Kroah-Hartman authored
This adds the GREYBUS_ID environment variable to all interface uevents to let userspace know the vendor/product id of the module interface that has been added or removed from the system. Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com> Reviewed-by:
Viresh Kumar <viresh.kumar@linaro.org>
-
Rui Miguel Silva authored
To support key events coming from the svc (ara key) it is needed to add the input core as an required config option. Signed-off-by:
Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Johan Hovold authored
Refactor connection enable and disable. This is a step towards removing the legacy-protocol handling from core. 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>
-
Johan Hovold authored
Set connection state to ENABLE before sending the control connected message, and set state DISABLE after sending the control disconnected event. Remove the now unused ERROR connection state. Signed-off-by:
Johan Hovold <johan@hovoldconsulting.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Rui Miguel Silva authored
Add a new write-only svc attribute to send an eject request to the svc giving the interface number. So, doing: echo 3 > /sys/bus/greybus/devices/1-svc/intf_eject will force eject the module on interface 3 (module slot 1 on EVT1). This can take some seconds as the pulse width for module release is large. Signed-off-by:
Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com> Reviewed-by:
Jeffrey Carlyle <jcarlyle@google.com>
-
Rui Miguel Silva authored
Add a new svc operation which will be used to send a request to eject a given interface. Signed-off-by:
Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com> Reviewed-by:
Jeffrey Carlyle <jcarlyle@google.com>
-
- 12 Jan, 2016 10 commits
-
-
Rui Miguel Silva authored
The correct check for if the power supply is ready to receive event is wrong and it should check for the registered flag. Signed-off-by:
Rui Miguel Silva <rui.silva@linaro.org> Reported-by:
Johan Hovold <johan@hovoldconsulting.com> Reviewed-by:
Johan Hovold <johan@hovoldconsulting.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Greg Kroah-Hartman authored
This moves all of the APBridge request protocol commands that are currently used to a common .h file for everyone to be able to use them in the future, where needed. Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com> Tested-by:
Mark Greer <mgreer@animalcreek.com> Reviewed-by:
Johan Hovold <johan@hovoldconsulting.com>
-
Greg Kroah-Hartman authored
Provide a new function, gb_hd_output() to send data to the apbridge. This is useful for the camera and audio drivers that need to do this type of messaging. The camera driver is converted to use this new function, the audio driver can use it when it gets merged later. Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com> Tested-by:
Mark Greer <mgreer@animalcreek.com> Reviewed-by:
Johan Hovold <johan@hovoldconsulting.com>
-
Rui Miguel Silva authored
Individual power supply were being freed and checked using the wrong pointers and at the wrong place, which would make several issues, like used after free and so on. Fix it by freeing all allocated memory after release individual power supply. Signed-off-by:
Rui Miguel Silva <rui.silva@linaro.org> Reported-by:
Johan Hovold <johan@hovoldconsulting.com> Reviewed-by:
Johan Hovold <johan@hovoldconsulting.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Rui Miguel Silva authored
When fetching string properties, memory was being allocated and leaked when it was not necessary to do so. Signed-off-by:
Rui Miguel Silva <rui.silva@linaro.org> Reviewed-by:
Johan Hovold <johan@hovoldconsulting.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Rui Miguel Silva authored
If something goes wrong at setup time for the supplies, we need to release all the resources allocated already. Call the supplies release function which will handle the correct teardown of the supplies. Signed-off-by:
Rui Miguel Silva <rui.silva@linaro.org> Reported-by:
Johan Hovold <johan@hovoldconsulting.com> Reviewed-by:
Johan Hovold <johan@hovoldconsulting.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Rui Miguel Silva authored
After freeing each individual power_supply, free the top controller, if not it will leak memory at each module insert/remove. Signed-off-by:
Rui Miguel Silva <rui.silva@linaro.org> Reported-by:
Johan Hovold <johan@hovoldconsulting.com> Reviewed-by:
Johan Hovold <johan@hovoldconsulting.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Rui Miguel Silva authored
If setup fail the release for each supply needs to know the status at unregister time. So, add the field to the structure, update it at setup time and use it at release. Signed-off-by:
Rui Miguel Silva <rui.silva@linaro.org> Reported-by:
Johan Hovold <johan@hovoldconsulting.com> Reviewed-by:
Johan Hovold <johan@hovoldconsulting.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Rui Miguel Silva authored
If allocation of memory for each supply fail, we should get out of release any individual supply. Signed-off-by:
Rui Miguel Silva <rui.silva@linaro.org> Reported-by:
Johan Hovold <johan@hovoldconsulting.com> Reviewed-by:
Johan Hovold <johan@hovoldconsulting.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Johan Hovold authored
Make sure to release the supplies_lock before returning on errors in gb_power_supplies_setup(). Signed-off-by:
Johan Hovold <johan@hovoldconsulting.com> Reviewed-by:
Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
- 11 Jan, 2016 18 commits
-
-
Vaibhav Hiremath authored
Add wake_detect support to arche-platform driver which is responsible for SVC control. This patch also adds code for handshaking between AP <=> SVC. The sequence is, 1. AP boots To keep compatibility between DB3 and EVT platform, SVC will be help in reset and AP driver would release it at appropriate time. wake/detect pin (WD8A) = Low reset (SVC/APB1/APB2) = Asserted (as per polarity) 2. AP Driver gets inserted 2.1. AP will deassert reset to SVC (following power on sequence) 2.2. SVC allows 360 milliseconds to elapse after switch boots to work around bug described in ENG-330. 2.3. AP asserts wake/detect pin (WD8A = HIGH) 3. SVC detects assertion of wake/detect pin, and sends "wake out" signal to AP 4. AP receives "wake out" signal, takes AP Bridges through their power on reset sequence as defined in the bridge ASIC reference manuals 5. AP takes USB3613 through its power on reset sequence 6. AP should enumerates AP Bridges Note: ISR has been deliberately removed (not merged) as we are still not sure how it will be used, in runtime usage context. Driver as such doesn't do anything for runtime assert-n-deassert of reset to SVC/APB's, it just simply offloads it to user by exporting required gpio's. The exported gpio's are required for FW flashing from user space. When it comes to usersace manipulated control sequence, user has to manage. Signed-off-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Tested-by:
Michael Scott <michael.scott@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Vaibhav Hiremath authored
Now the complete handshaking between AP<=>SVC would be offloaded to parent driver (arche-platform) who is responsible for SVC control, so the apb-ctrl driver can just simply bring APB's out of reset during probe itself. Along with deasserting reset, this patch renames the local fn to exclusively use it for reset purpose. Note that, driver is exporting reset gpio to user, so user can still flash FW from prompt. Signed-off-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Tested-by:
Michael Scott <michael.scott@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Vaibhav Hiremath authored
With TIME_SYNC functionality, assignment of wake/detect pin will change, WD_8A => to bring APB's out of reset WD_8B => TIME_SYNC operation So in order to support this, we can no longer keep wake_detect gpio in apb-ctrl driver. So remove it. In the subsequent patches, wake_detect support will be added to parent SVC driver (arche-platform) who is responsible for SVC control. Note that, this patch also removes ISR related code. The APB state still is maintained, for future use. Signed-off-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Tested-by:
Michael Scott <michael.scott@linaro.org> Reviewed-by:
Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
This removes few unwanted headers related to irq, interrupt, regulator, spinlock, etc. Also arrange the rest in alphabetical order to make it more readable. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
wake_detect_gpio and resetn_gpio are guaranteed to be valid in apb_ctrl_cleanup() and irq-handler, no need to check for their validity. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
Relying on apb_ctrl_cleanup() to do the cleanup for errors that occurred within apb_ctrl_init_seq() isn't a very clean idea. Handle that separately within apb_ctrl_init_seq(). This will clean apb_ctrl_cleanup() in later patches. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
If devm_gpio_request() returns an error, we shouldn't try to set the direction of the same gpio. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
Use dev_err for errors after which we need to abort the currently running routine and dev_warn for resource allocation failure, with which we can continue to work. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
Since NULL could in theory be a valid regulator we ought to check for IS_ERR() rather than for NULL. In practice this is unlikely to be an issue but it's better for neatness. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
And so we don't need to check for it. 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>
-
Viresh Kumar authored
There can be no invalid values in the DTS. The actual pin numbers are assigned by gpiolib when the gpio controller is registered. And so a simple 'gpio < 0' is enough instead of gpio_is_valid() which also checks for 'gpio < ARCH_NR_GPIOS'. This will make the usage of of_get_named_gpio() similar with how it is done in arche-platform driver. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
Platform data 'apb' is guaranteed to be valid in arche_apb_ctrl_remove() and so no need to check it. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
- s/premits/permits - Remove blank lines at the end of the file Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
Propagate errors returned by of_get_named_gpio() instead of sending -ENODEV. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
svc_reset_gpio is guaranteed to be valid in arche_platform_cleanup. Drop the useless check. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
The current implementation around of_platform_populate() is not so great. On error, we first print an error message, followed by a success message and finally we return an error. And over that we don't undo what we did initially. This patch puts the APB back into reset and create a separate error path to make things clear. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
Populating APBs operation can potentially fail and it would be better if we export the GPIOs towards then end of the routine, so that we don't need to unexport them on error cases. Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
arche_pdata is guaranteed to be valid in arche_platform_remove(). Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by:
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
-