summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2013-03-15staging: comedi: ni_atmio: fix build error due to missing '; 'H Hartley Sweeten
Fix a build error due to a missing ';' at the end of a line. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reported-by: Geert Uytterhoeven <geert.uytterhoeven@gmail.com> Cc: Kumar Amit Mehta <gmate.amit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15Staging: dwc2: remove a kfree(NULL)Dan Carpenter
dwc2_hcd_release() calls dwc2_hcd_free() which frees ->core_params and sets it to NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: sep: fix possible memory leak in sep_prepare_input_dma_table()Wei Yongjun
'lli_array_ptr' etc. are malloced in sep_prepare_input_dma_table() and should be freed before leaving from the error handling case, otherwise it will cause memory leak. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: add documentation for omap_bandgap_validateEduardo Valentin
Document the helper to validate a struct omap_bandgap and a sensor id. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: remove TODO entry for exposed APIsEduardo Valentin
Not all APIs exposed today are used. However all unused APIs will be required once the thermal layer allows IRQ based policies. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: remove TODO entry suggesting regmap usageEduardo Valentin
It is hard to use regmap because benefit of using regmap cache may not be applicable as there is a specific sequence to restore the bandgap context. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: switch mutex to spinlock inside omap-bandgapEduardo Valentin
Because there is a need to lock inside IRQ handler, this patch changes the locking mechanism inside the omap-bandgap.[c,h] to spinlocks. Now this lock is used to protect omap_bandgap struct during APIs exposed (possibly used in sysfs handling functions) and inside the ALERT IRQ handler. Because there are registers shared among the sensors, this lock is global, not per sensor. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: change Kconfig dependency methodEduardo Valentin
Now arch code has to specify CONFIG_ARCH_HAS_BANDGAP. So, this driver will be selectable only if the platform reports itself as having a bandgap device. Any OMAP variant or any other OMAP version needs to select ARCH_HAS_BANDGAP so that the driver will be applicable. A part from that it is required to device the data structures that maps the registers and their bitfields. The DT compatible list must also be updated. CC: Santosh Shilimkar <santosh.shilimkar@ti.com> CC: Vaibhav Bedia <vaibhav.bedia@ti.com> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: document omap_bandgap_build functionEduardo Valentin
Document function to build omap_bandgap structure Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: document omap_bandgap_alert_init functionEduardo Valentin
Document function that sets talert handling up. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: document omap_bandgap_tshut_init functionEduardo Valentin
Add documentation for the function to setup TSHUT handling Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: document _omap_bandgap_read_threshold functionEduardo Valentin
Add documentation of the function for reading alert thresholds Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: document _omap_bandgap_write_threshold functionEduardo Valentin
Document function to update alert thresholds. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: document omap_bandgap_update_alert_threshold functionEduardo Valentin
Document function to program alert thresholds Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: document omap_bandgap_force_single_readEduardo Valentin
Document function to initialize the conversion state machine. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: update omap_bandgap_set_continous_mode documentationEduardo Valentin
Simple update on function documentation. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: rename enable_continuous_modeEduardo Valentin
This patch names 'enable_continuous_mode' accordingly to the file standard naming. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: section of device driver callbacksEduardo Valentin
Section with platform device callbacks Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: device initialization sectionEduardo Valentin
Section of helper functions to initilize the bandgap device Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: refactor APIs handling threshold valuesEduardo Valentin
This patch improves the code that handles threshold values by creating single functions that are usable for tcold and thot. This way we won't have duplicated functionality just because it is handling different bitfields. Now the added functions are reused in several places where it is needed to update any threshold. This patch also removes macros that are used only inside the _validate helper function. In this patch there is also an addition of an extra function section for Exposed APIs, used outside the omap-bandgap.c, but inside the omap-thermal driver. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: update omap_bandgap_unmask_interrupts documentationEduardo Valentin
Proper document the function to configure the IRQ event masks. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: refactor temp_sensor_unmask_interruptsEduardo Valentin
This change improves temp_sensor_unmask_interrupts by: . renaming it to omap_bandgap_unmask_interrupts . making it a void function, as there is nothing really to report an error. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: threshold manipulation sectionEduardo Valentin
Section of functions manipulating thresholds for Alert and Shutdown. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: document omap_bandgap_add_hyst functionEduardo Valentin
Document function to handle hysteresis. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: rename add_hyst to omap_bandgap_add_hystEduardo Valentin
This patch improves the add_hyst function by: . Renaming it to omap_bandgap_add_hyst . Moving it to the ADC conversion functions section . Changing its signature to follow the driver standard Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: add documentation for omap_bandgap_mcelsius_to_adcEduardo Valentin
Document the conversion function. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: move conv table limits out of sensor dataEduardo Valentin
As we have one conv table per bandgap device and not per sensor, this patch changes the data structures so that the conv table min and max values are now part of bandgap_data and not sensor_data. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: rewrite omap_bandgap_mcelsius_to_adc on kernel coding ↵Eduardo Valentin
style Follow Documentation/CodingStyle while doing omap_bandgap_mcelsius_to_adc Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: name temp_to_adc_conversion in a better wayEduardo Valentin
Rename temp_to_adc_conversion to omap_bandgap_mcelsius_to_adc. This name, though longer, describes better the function. This patch also changes this function signature so the function follows the style of this file. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: add documentation for omap_bandgap_adc_to_mcelsiusEduardo Valentin
Document the conversion function. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: rewrite omap_bandgap_adc_to_mcelsius on kernel coding ↵Eduardo Valentin
style Follow Documentation/CodingStyle while doing omap_bandgap_adc_to_mcelsius. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: name adc_to_temp_conversion in a better wayEduardo Valentin
Rename adc_to_temp_conversion to omap_bandgap_adc_to_mcelsius. This name, though longer, describes better the function. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: ADC sectionEduardo Valentin
Section of ADC helpers functions Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: IRQ handler sectionEduardo Valentin
Section of IRQ handlers Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: section of basic helpersEduardo Valentin
Group of simple functions aggregating basic functionality. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: add a section of register manipulationEduardo Valentin
This is introduces a series of marks inside the code to better organize functions per group, aggregating their functionality. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: read status only once inside alert IRQEduardo Valentin
There is no need to re-read status register. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: remove duplicated codeEduardo Valentin
There is no need to assign twice the same variable with the very same value. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: update tshut IRQ handler documentationEduardo Valentin
Documents tshut handler better. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: update documentation for talert irq handlerEduardo Valentin
Document the Talert IRQ handler. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: rename talert handlerEduardo Valentin
Simple rename to cope with file naming pattern. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: add documentation for omap_bandgap_read_tempEduardo Valentin
Document function which reads temperature register, depending on bandgap device version. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: add documentation for omap_bandgap_powerEduardo Valentin
Document the helper function to turn a bandgap device on and off. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: make a omap_bandgap_power with only one exit pointEduardo Valentin
Change the way the omap_bandgap_power is written so that it has only one exit entry (Documentation/CodingStyle). Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: add documentation for register access functionsEduardo Valentin
Document the helper functions that manipulates registers and their bitfields. All of them work based of the io mapped area. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: introduce RMW_BITS macroEduardo Valentin
This patch introduce a macro to read, update, write bitfields. It will be specific to bandgap data structures. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: fix error checkingEduardo Valentin
The omap_bandgap_get_sensor_data() function returns ERR_PTR(), but it can also return NULL, in case of initilization, so we need to use IS_ERR_OR_NULL() rather than only IS_ERR(). Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: style cleanup on omap-bandgap.cEduardo Valentin
simple changes on alignments and white spaces Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: update documentation of omap-bandgap.hEduardo Valentin
This patch updates the existing data structures for omap bandgap, inside omap-bandgap.h. TODO: remove unused fields. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15staging: omap-thermal: create header for register, bitfields and definitionsEduardo Valentin
In order to have a better code readability and organization, this patch splits omap-bandgap.h into three headers. . omap-bandgap.h will contain only the driver related data structures definitions and macros . omap4xxx-bandgap.h will contain only defines and bitfields related to OMAP4 based devices . omap5xxx-bandgap.h will contain only defines and bitfields related to OMAP5 based devices Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>