Age | Commit message (Collapse) | Author |
|
regulator_get returns a ERR_PTR in case of an error and not a NULL pointer.
|
|
|
|
|
|
|
|
... and remove unused reset pin resource.
|
|
The gta02 uses the glamo mfd driver which requires 9 board irqs.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
|
|
Some boards have a need for a set of extra IRQ numbers, for example some
multifunction devices which do irq demultiplexing require them.
This patch adds S3C2410_BOARD_NR_IRQS which specifies the number of extra board
IRQs. Board specific code would use S3C2410_BOARD_IRQ_START to get the number of
it's first irq.
Since it is possible to support a multiple boards with a single kernel and
there is no easy way to set a CONFIG option to multiple values and only use the
maximum each board which needs board IRQs has do be explicitly added to irqs.h
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
|
|
Although there will probably never any other platform using the glamo...
|
|
Also fixup order in which the irq handler and it's data are initalized.
|
|
|
|
|
|
|
|
|
|
request has been finished.
|
|
sg list.
|
|
|
|
|
|
'glamo-2.6.31', 'jbt6k74-2.6.31', 'gta02-vibrator-2.6.31', 'bq27000-2.6.31', 'wm8753-2.6.31' and 'pcf50633-2.6.31' into om-gta02-2.6.31
|
|
Currently the pcf50633-regulator driver data is set to the pcf50633 core
structure, but the pcf50633-regulator remove handler assumes that it is set to
the regulator device. This patch fixes the issue by accessing the pcf506533
core structure through its parent device and setting the driver data to the
regulator device.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
|
|
Platform devices allocated with platform_device_alloc should use
platform_device_add_data to set the platform data, because kfree will be called
on the platform_data when the device is released.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
|
|
Currently the child devices were not freed if the irq could not be requested.
This patch restructures the function, that in case of an error all previously
allocated resources are freed.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Since platform_device_add_data copies the passed data, the allocated
subdev_pdata is never freed. A simple fix would be to either free subdev_pdata
or put it onto the stack. But since the pcf50633 child devices can rely on
beeing children of the pcf50633 core device it's much more elegant to get access
to pcf50633 core structure through that link. This allows to get completly rid
of pcf5033_subdev_pdata.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
|
|
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
When not using the i2c suspend/resume callbacks the i2c client resumed
before the i2c master.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
On gta02 hardware revision A5 it can actually bring the system down
during normal operating conditions so we disable it.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Balaji Rao <balajirrao@openmoko.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
This adds an appropriate ac power_supply class and shows usb only when
at the appropriate current limit.
Signed-off-by: Sean McNeil <sean@mcneil.com>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
This patch adds setting and clearing of the "pending" flag of the
RTC alarm. The semantics follow the UEFI specification 2.2 available
at http://www.uefi.org/specs/, i.e., the "pending" flag is cleared
by disabling the alarm, but not by any other condition (such as the
passing of time, a successful wakeup, or setting of a new alarm.)
Signed-off-by: Werner Almesberger <werner@openmoko.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
According to Documentation/rtc.txt, RTC_WKALM_SET sets the alarm time
and enables/disables the alarm. We implement RTC_WKALM_SET through
pcf50633_rtc_set_alarm. The enabling/disabling part was missing.
Signed-off-by: Werner Almesberger <werner@openmoko.org>
Reported-by: Michael 'Mickey' Lauer <mickey@openmoko.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
The PCF50633 stores a month value of 1-12, but the kernel wants 0-11.
Signed-off-by: Rask Ingemann Lambertsen <rask@sygehus.dk>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
This patch implements list_voltage for the pcf50644 regulator driver.
As the voltages are linearly scaled the code to convert register values to
voltages can be reused and most of the code can be shared with get_voltage.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
|
|
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>
|
|
cleanups
|
|
|
|
|
|
Add the S3C2442B CPU ID to aid support the Openmoko GTA02 / Freerunner.
Signed-off-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
[ben-linux@fluff.org: edit description for clarity and S3C2442B as uppercase]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
|
|
|
|
|
|
|