aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2009-11-26mfd: glamo: Enable FIFO stage for the LCD engine's memory accessThomas White
By avoiding conflicts of memory access inside Glamo, this doubles the speed of internal memory access. Signed-off-by: Thomas White <taw@bitwiz.org.uk> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-11-26input: lis302dl: fix the resume pathMichael Trimarchi
This fix the resume path of the accelerometer. If the accelerometer is not power up, restore to initial status. Move the REG_CTRL1 to the last one position avoid writing on the register when the device is in power down mode. Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-11-05glamo-spi: missing semicolon after MODULE_AUTHOR()Martin Jansa
Fix compilation error due to missing semicolon Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-09-24Fix small typoNelson Castillo
s/though/thought/ Reported-by: Rask Ingemann Lambertsen <ccc94453@vip.cybercity.dk> Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-09-22Remove sort call from group filterNelson Castillo
This patch applies upstream feedback to the group filter. The algorithms are equivalent, thus we will get the same results after applying this patch. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-09-22Fix Andy's email in filters.Nelson Castillo
He is not reachable at the OM address. We need the right email if we send upstream. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-09-22s3_ts: cleanupsNelson Castillo
General cleanups. Now we pass checkpatch.pl. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-09-22Make s3c TS driver use s3c-adc APINelson Castillo
I had a patch by Vasily Khoruzhick <anarsoul@gmail.com> in the linux-arm-kernel as a guide for some of the changes. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-09-22Remove dependence on old netdev operationsMichael Trimarchi
Remove the dependence to the OLD NET DEV operation Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
2009-09-02pcf50606: fix RTC alarmArnaud Patard
This makes wake up on RTC alarm work properly, ported from rtc-pcf50633 commits 4caf79de95c26495e7cdc8204023d97598f887d2 and c3e4e22fb0c3e1d82f66e67f6592949e48f3995a. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-09-02pcf50633: move messages to appropriate log levelsArnaud Patard
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-09-02pcf50606: move messages to appropriate log levelsArnaud Patard
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-09-02Revert "AR6000: move low-level cleanup from ar6000_destroy to ar6000_close"Paul Fertser
This reverts commit 9c4451ff31b937a478f3d3eabef30b71cbe12b12. This commit made wifi unusable after ifconfig down and sometimes after unbinding.
2009-08-02pcf50633: query charger status directlyPaul Fertser
Current scheme is fragile and is likely to go off sync, especially on batfull->adapter charging automatic MBC transition. Query the status bit every time we need it instead. We need to export another function to query for USB presence because we can't read anything from PCF50633 (via I2C) inside irq context and that is needed by usb gadgets. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-08-02pcf50633: properly reenable charging when the supply conditions changePaul Fertser
If chgmod == BATFULL, setting chgena has no effect. Datasheet says we need to set resume instead but when autoresume is used resume doesn't work. Clear and set chgena instead. This enables a user to force charging by re-plugging USB even when the charger entered Battery Full mode, might be handy before a long trip. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-08-02pcf50633: get rid of charging restart software auto-triggeringPaul Fertser
After reaching Battery Full condition MBC state machine switches back into charging mode when the battery voltage falls below 96% of a battery float voltage. The voltage drop in Li-Ion batteries is marginal (1-2%) till about 80% of its capacity - which means, after a BATFULL, charging won't be restarted until 75-80%. That is a desired behaviour recommended by battery manufacturers, don't mess with it. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-08-02pcf50633: revise locking for ADCPaul Fertser
Current implementation is prone to races, this patch attempts to remove all but one (in pcf50633_adc_sync_read). The idea is that we need to guard the queue access only on inserting and removing items. If we insert and there're no more items in the queue it means that the last irq already happened and we need to trigger ADC manually. If not, then the next conversion will be triggered by the irq handler upon completion of the previous. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-08-02pcf50633: use a dedicated workqueue for irq processingPaul Fertser
Using the default kernel "events" workqueue causes problems with synchronous adc readings if initiated from some task on the same workqueue. I had a deadlock trying to use pcf50633_adc_sync_read from a power_supply class driver because the reading was initiated from the workqueue and it waited for the irq processing to complete (to get the result) and that was put on the same workqueue. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-08-02gta01_battery: add charge_{now,full} propertiesPaul Fertser
Some userspace (notably Enlightment's batget) ignores "capacity" completely if there're no other properties. Expose a fake value (850mAh, typical for BL-5C) to make them happy. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-08-02gta01_battery: generalise the driver, add capacity estimationPaul Fertser
Check if machine-specific hooks exist before calling, this allows to use this driver with gta02 or any other device that is able to provide battery voltage readings. Report an estimate of capacity percentage left, based on discharge curves. Strictly speaking, this is a violation of power_supply class specs but since this is the only driver for dumb batteries and userspace lacks any library to do the estimation itself, we have to stuff it here. Please keep in mind that this estimation is by no means accurate, usually cell phones have only 5 bars to represent charge status. Credit goes to Joerg Reisenweber and SpeedEvil for helping with gathering and analysing the data. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-08-02gta01_battery: fix unloading bugPaul Fertser
Driver data must be properly registered after allocation Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-07-27bq27000: Return -ENODEV in bq27000_battery_get_property if the battery is notLars-Peter Clausen
If the battery is not present hdq_read will always return an error. If the drivers knows that the battery is not present the correct thing to do is to return -ENODEV instead of passing the error on. Do this for all properties except POWER_SUPPLY_PROP_PRESENT. The power supply sysfs expects us to do so, else it won't generate a proper uevent file. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2009-06-21RNDIS: crude hack to fix oops on connecting to WXP SP2Paul Fertser
F4t discovered that his freerunner panics on connect to his windows box. This crude hack workarounds the problem. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-06-13gta02: move debugging messages to the appropriate levelsPaul Fertser
Clean up debugging messages so that we don't see any output with loglevel=4 (default for Qi). This avoids slowing down suspend/resume by slow fb output. Checkpatch barks on this patch but i guess most of that debugging would have to be changed prior to upstream submission anyway. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-06-10CONFIG_BATTERY_BQ27000_HDQ selects CONFIG_HDQ_GPIO_BITBANGLuca Capello
This is because of commit 1f06c28eaa6e77384a366c3d2ab1ccdbb8a807e0 The BQ27000 Battery requires HDQ. Otherwise the battery is not available at all. Signed-off-by: Luca Capello <luca@pca.it>
2009-06-09GTA0[12]: make headset button report PLAY pressed on pressPaul Fertser
As discussed on the ML, currently headset button reports "KEY_PAUSE released" on press and "pressed" on release. For "pause" semantics it makes sense but if someone thinks of that as of just another button, it'd be good to have "pressed/released" events consistent with button press/release. Luca Capello <luca@pca.it> suggested to change the button event to KEY_PLAY and to invert the state to make it more consistent. This trivial patch inverts button events for GTA03 KEY_PLUS and KEY_MINUS, i'm not sure how undesirable that is. I can prepare an alternative that preserves current behaviour on GTA03 per request. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-06-04GTA02: bq27000 report current chargePaul Fertser
Using HAL for E's battery gadget highlighted an oddity: the kernel exposed last full charge property but didn't expose current charge property. This resulted in the wrong computation of current battery capacity by E's gadget (and probably other programs as well). This patch exposes a corresponding bq27000 register to make E battery gadget happy (it is still not showing correct values because of bugs in HAL resulting in 3 batteries (apm emulation and usb supply being bogus here) instead of one). Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-06-01Improve battery status notificationMichael Trimarchi
This patch adds a call to cancel_delayed_work before a call to schedule_delayed_work. Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org> Signed-off-by: Daniel Willmann <daniel@totalueberwachung.de>
2009-05-15 This patch adds the option to poll vbus status to the s3c24xx udc driver.Mike Westerhof
Machines that do not route the USB vbus signal to a GPIO can use this mechanism as an alternate way for the udc driver to detect the usb connect/disconnect state, which is useful (for example) to enable the link up/down state to be determined for the g_ether gadget. Signed-off-by: Mike Westerhof <mwester@dls.net>
2009-05-15usb gadget: fix ethernet link reports to ethtoolJonathan McDowell
The g_ether USB gadget driver currently decides whether or not there's a link to report back for eth_get_link based on if the USB link speed is set. The USB gadget speed is however often set even before the device is enumerated. It seems more sensible to only report a "link" if we're actually connected to a host that wants to talk to us. The patch below does this for me - tested with the PXA27x UDC driver. Signed-off-by: Jonathan McDowell <noodles@earth.li> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-05-14Avoid null pointer access on early call to pcf50633_mbc_get_statusNelson Castillo
Avoid a kernel panic during an early call to the pcf50633_mbc_get_status function.
2009-05-05Glamo MFD: MFD_GLAMO_SPI_GPIO requires SPI_BITBANG to buildRask Ingemann Lambertsen
This patch fixes a linking failure in the Glamo GPIO SPI bitbang support. Signed-off-by: Rask Ingemann Lambertsen <rask@sygehus.dk>
2009-05-05Glamo MFD: Fix indentation of Kconfig, convert spaces to tabsRask Ingemann Lambertsen
This patch fixes some indentation which was off by one and converts spaces to tabs. Signed-off-by: Rask Ingemann Lambertsen <rask@sygehus.dk>
2009-04-28GTA01: Add "present" property to power_supplyNelson Castillo
Small patch to add /sys/class/power_supply/battery/present. You must not run a GTA01 without battery thus it is always 1. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-04-28Call unbind() hook of the usb gadget so that it can properly release its ↵Timo Juhani Lindfors
resources Call unbind() hook of the gadget so that it can properly release its resources. This fixes bug http://docs.openmoko.org/trac/ticket/2240 ("removing/reloading g_ether not working"). All other instances of usb_gadget_unregister_driver in Linux already call unbind() so it is bit odd s3c2410_udc.c did not do so. Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
2009-04-23Update status batteryMichael Trimarchi
This patch adds the call to the worker in bq27000_battery_external_power_changed. Now (un)plugging the USB cable effects the battery status soon. I don't know if it is possible call the status change directly. Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org> Signed-off-by: Daniel Willmann <daniel@totalueberwachung.de>
2009-04-21This patch take the min platform data array size and keys array size.Michael Trimarchi
Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
2009-04-21glamo_fb: make Xglamo workaround conditionalNelson Castillo
Distributions that use Xorg will not need the workaround at all and now they can disable it. Updated configurations to enable it by default. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-04-21glamo_fb: Small cleanupNelson Castillo
~ Cleanup of a redundant call I introduced before. ~ Removed useless assignation. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-04-20Make Xglamo workaround opt-out. Fixes #2255.Nelson Castillo
To disable the workaround at run-time run: echo 0 > /sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-regltr.9/glamo3362.0/glamo-fb.0/xglamo_hack I guess I should add a compile option now to completely disable the workaround but let's call this an enhancement and let's close the bug now. By default the workaround is enabled. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net> Reported-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
2009-04-19Revert "Revert "Fixed the LCM driver state transition delay and pixel clock ↵Nelson Castillo
issue"" This reverts commit aa2dbc74bed8cf60e591c654ba1882011b9a8ece. Reverting the revert. Sorry for the noise. Check: http://lists.openmoko.org/pipermail/openmoko-kernel/2009-April/010023.html
2009-04-19Revert "Fixed the LCM driver state transition delay and pixel clock issue"Nelson Castillo
This reverts commit bd4b7e8e84ab43a13a4620b001d52d373c2122b3 which brought WSOD back for some devices. It was reported that the problem does not happen with Qi and it seem it is good news. See: https://docs.openmoko.org/trac/ticket/2274 Conflicts: drivers/video/display/jbt6k74.c
2009-04-15OHCI: Disabled additional debuggingPaul Fertser
Disabled additional debugging introduced in 70b36104ab8c03f5be6d03344214d09447d9d4a8
2009-04-14Too many info messages for apm battery supportTim Niemeyer
Changing dev_info => dev_dbg. Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2009-04-14Fix kernel oops when starting wpa_supplicant.Mike Westerhof
This closes bug #2267. Signed-off-by: Mike Westerhof <mwester@dls.net>
2009-04-13fbcon: Cleaned unnecessary debugging output (fix bug 2265)Nicolas Dufresne
Cleaned unnecessary debugging output. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@gmail.com>
2009-04-08Re-enable USBHOST attributeMichael Trimarchi
Re-enable usbmode attribute. It was disabled by 70b36104ab8c03f5be6d03344214d09447d9d4a8. Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
2009-04-08Cleanup USB host code of s3c2410Michael Trimarchi
Cleanup code of ohci-s3c2410. Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
2009-04-05Fixed the LCM driver state transition delay and pixel clock issueNicolas Dufresne
Space transition between sleep-in and sleep-out of at least 120 ms as mentionned in the spec. Also, made sure the LCM is moved into sleep state before the pixel clock is turned off. To do so, I've modified glamo-fb to send FB_BLANK_POWERDOWN before turning off the pixel clock. Also fixed various violation of coding style. This patch should reduce the risk of white screen. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@gmail.com>
2009-04-02AR6000: move low-level cleanup from ar6000_destroy to ar6000_closeWerner Almesberger
A network device is supposed to disable its internals in the "close" function. Doing so affords us protection against various races, including the ioctl vs. rfkill conflict reported by Michael. Signed-off-by: Werner Almesberger <werner@openmoko.org> Reported-by: Michael Trimarch <michael@panicking.kicks-ass.org>