11 Aug, 2010
40 commits
-
Be more consistent about runtime programming interface abuse warnings,
which can reduce some confusion and trigger bugfixes. Based on an
observation and patch from Jani Nikula.Also update doc to highlight some sleeping-call issues and to match some
recent changes.Signed-off-by: David Brownell
Cc: Jani Nikula
Cc: "Ryan Mallon"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Provide sane defaults for pcf857x, so the driver can be used w/o providing
platform data (and thus can be simply bound via OF tree).Signed-off-by: Dmitry Eremin-Solenikov
Cc: Jean Delvare
Cc: David Brownell
Cc: Grant Likely
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The gpios on the max730x chips have support for internal pullups while in
input mode.This patch adds support for configuring these pullups via platform data.
A new member ("input_pullup_active") to the platform data struct is
introduced. A set bit in this variable activates the pullups while the
respective port is in input mode. This is a compatible enhancement since
unset bits lead to disables pullups which was the default in the original
driver._Note_: the 4 lowest bits in "input_pullup_active" are unused because the
first 4 ports of the controller are not used, too.Signed-off-by: Marc Kleine-Budde
Reviewed-by: Wolfram Sang
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The Ricoh RP5C01 RTC contains 26 x 4 bits of NVRAM. Provide access to it
via a sysfs "nvram" attribute file.Signed-off-by: Geert Uytterhoeven
Cc: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Because CONFIG_PM is a precondition to CONFIG_ACPI, the ifdef CONFIG_PM
within ifdef CONFIG_ACPI is redundant.Signed-off-by: Christian Dietrich
Acked-by: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Mask out PM flag when reading the hour, always set MIL bit when
writing the hour.Signed-off-by: Roman Fietze
Acked-by: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add a driver for the DS3232 RTC chip via the I2C bus. Alarms are not
supported in this version of the driver.[akpm@linux-foundation.org: fix Kconfig help text]
Signed-off-by: Mingkai Hu
Signed-off-by: Jingchang Lu
Signed-off-by: Srikanth Srinivasan
Signed-off-by: Roy Zang
Acked-by: Wan ZongShun
Cc: Kumar Gala
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove unused local variable.
Signed-off-by: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch does two modifications:
(1) Adjust enable/disable IRQs location,enable it after rtc
registration and disable it prior to unregistration.(2) Put 'platform_set_drvdata(pdev, nuc900_rtc)' in front of rtc
registration still be safety, though there is no need to do this, when
I move enable irq after rtc registration, I think still put
'platform_set_drvdata' before rtc registration that would be a good
habit.Signed-off-by: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Make returning time checking function valid. In spite of using the
'rtc_valid_tm', nevertheless, the read time function omits its returning
value, that means the 'rtc_valid_tm' is useless here.Signed-off-by: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use rtc_valid_tm() to check the returned struct rtc_time *tm, to avoid
returning a wrong tm value.Signed-off-by: Wan ZongShun
Cc: Paul Gortmaker
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use rtc_valid_tm to check the returned struct rtc_time *tm, to avoid
returning a wrong tm value.Signed-off-by: Wan ZongShun
Cc: Paul Gortmaker
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use rtc_valid_tm() to check returning tm for max6900, it can avoid
returning wrong tm value.Signed-off-by: Wan ZongShun
Acked-by: Dale Farnsworth
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use rtc_valid_tm() to check returned struct rtc_time *tm - it can avoid
returning wrong tm value.Signed-off-by: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
- derived from rtc-pcf8563
- no SRAM driver
Signed-off-by: Roman Fietze
Cc: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This driver is based on code from Freescale which accompanies their i.MX25
PDK board, with some cleanup.Signed-off-by: Baruch Siach
Cc: Alessandro Zummo
Cc: Sascha Hauer
Acked-by: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Huang Weiyi
Acked-by: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We shouldn't implement private ops->ioctl() unless absolutely necessary.
pxa series RTC driver's ioctl() is unnecessary, since RTC subsystem has
implement the ioctl() very well,so we can only use the API of
'.alarm_irq_enable' and '.update_irq_enable' to do enable irq action.Signed-off-by: Wan ZongShun
Acked-by: Robert Jarzmik
Acked-by: Eric Miao
Cc: Paul Gortmaker
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
- add sanity check for alarm data in fm3130_probe
- fix fm3130_set_alarm.
According to the datasheet, setting match bit '0' indicates that the
corresponding alarm field will be used in the match process- add operation alarm_irq_enable operation which is responsible for
handling RTC_AIE_ON, RTC_AIE_OFF ioctls- remove clearing of AF bit after reading rtc/alarm control register:
according to datasheet this bit is cleared anyway when rtc/alarm control
register is read[akpm@linux-foundation.org: make fm3130_alarm_irq_enable() static, fix comment layout]
Signed-off-by: Sergey Matyukevich
Acked-by: Wan ZongShun
Acked-by: Sergey Lapin
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove six unused fields from `struct rtc_plat_data'.
Signed-off-by: Wan ZongShun
Cc: Alessandro Zummo
Cc: Paul Gortmaker
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Wan ZongShun
Cc: Alessandro Zummo
Cc: Paul Gortmaker
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
pxa_rtc.rtc_alarm is unused.
Signed-off-by: Wan ZongShun
Cc: Eric Miao
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Graham Gower
Acked-by: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When a user application wants to set the rtc time, the RTC subsystem takes
advantage of 'rtc_valid_tm(tm)' to check 'rtc_time *tm' value validity, it
make sure the 'tm->tm_year' is larger than 70,so if '70< tm_year < 100',
the '(settm->tm_year - 100)' will be negative. ' Setting the negative
value to hardware register will be invalid, so I add the 'if' condition to
make sure set a valid value to register.Signed-off-by: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
- add an mdelay(1) to the polling loop to cause less frequent access to
the hardware register.- change the return value from ENODEV to EPERM if the loop timed out. I
think the 'Operation not permitted' description is more suitable for the
meaning of 'check_rtc_access_enable()' function, it just be used to
judge rtc access operation is permitted or not.Signed-off-by: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
After 97e7449a7ad: "autofs4: fix indirect mount pending expire race" we no
longer assumed that "ino" can be null. The other null checks got removed
but this was one was missed.Signed-off-by: Dan Carpenter
Cc: Ian Kent
Cc: Al Viro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Check return value of put_user() and return -EFAULT if it failed.
Original comment "We did a get user...so assuming mem is ok...is this
bad?" is incorrect because memory can be read only.Signed-off-by: Kulikov Vasiliy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
If (len > reslen) we must not call copy_to_user() since kernel buffer is
smaller than we want to copy. Similar code in this file is correct, so
this bug was a typo.Signed-off-by: Kulikov Vasiliy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add a mutex_unlock missing on the error path.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)//
@@
expression E1;
@@* mutex_lock(E1,...);
* mutex_unlock(E1,...);
//Signed-off-by: Julia Lawall
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Pablo Castillo
Signed-off-by: Stanislaw Gruszka
Tested-by: Gregg Lebovitz
Cc: Maxim Levitsky
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
P4080 ESDHC controller does not support 1.8V and 3.0V voltage. but the
host controller capabilities register wrongly set the bits. This patch
adds the workaround to correct the weird voltage setting bits. Only 3.3V
voltage is supported for P4080 ESDHC controller.Signed-off-by: Roy Zang
Cc: Jerry Huang
Cc: Benjamin Herrenschmidt
Cc: Kumar Gala
Cc: Grant Likely
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Roy Zang
Cc: Jerry Huang
Cc: Benjamin Herrenschmidt
Cc: Kumar Gala
Cc: Grant Likely
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add auto CMD12 command support for eSDHC driver. This is needed by P4080
and P1022 for block read/write. Manual asynchronous CMD12 abort operation
causes protocol violations on these silicons.Signed-off-by: Jerry Huang
Signed-off-by: Roy Zang
Cc: Benjamin Herrenschmidt
Cc: Kumar Gala
Cc: Grant Likely
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch adds support for regulator API to sdhci core driver.
Regulators can be used to disable power in suspended state to reduce
dissipated energy.Signed-off-by: Marek Szyprowski
Signed-off-by: Kyungmin Park
Acked-by: Mark Brown
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
On some Samsung SoCs not all SDHCI controllers have card detect (CD) line.
For some embedded designs it is not even needed, because ususally the
device (like SDIO flash memory or wifi controller) is permanently wired to
the controller. There are also systems which have a card detect line
connected to some of the external interrupt lines or the presence of the
card depends on some other actions (like enabling a power regulator).This patch adds support for all these cases. The following card detection
methods are possible:1. internal sdhci host card detect line
2. external event
3. external gpio interrupt
4. no card detect line, controller will poll for the card
5. no card detect line, card is permanently wired to the controller
(once detected host won't poll it any more)By default, all existing code would use method #1, what is compatible with
the previous version of the driver.In case of external event, two callbacks must be provided in platdata:
ext_cd_init and ext_cd_cleanup. Both of them get a callback to a function
that notifies the s3c-sdhci host contoller as their argument. That
callback function should be called from the even dispatcher to let host
notice the card insertion/removal.In case of external gpio interrupt, a gpio pin number must be provided in
platdata (ext_cd_gpio parameter), as well as the information about the
polarity of that gpio pin (ext_cd_gpio_invert). By default
(ext_cd_gpio_invert == 0) gpio value 0 means 'card has been removed', but
this can be changed to 'card has been removed' when ext_cd_gpio_invert ==
1.This patch adds all required changes to sdhci-s3c driver.
Signed-off-by: Marek Szyprowski
Signed-off-by: Kyungmin Park
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch enables SDHCI_QUIRK_NO_HISPD_BIT on Samsung SDHCI driver. This
solves detection problems with some external SD cards. This change has
been tested on S5PC100 and S5PC110. It has no inpact on driver speed.Signed-off-by: Kyungmin Park
Signed-off-by: Marek Szyprowski
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
S3C SDHCI host controller can change the source for generating mmc clock.
By default host bus clock is used, what causes some problems on machines
with 133MHz bus, because the SDHCI divider cannot be as high get proper
clock value for identification mode. This is not a problem for the
controller, because it can generate lower frequencies from other clock
sources. This patch changes sdhci driver to use get_min_clock() call if
it has been provided.This fixes the flood of the following warnings on Samsung S5PV210 SoCs:
mmc0: Minimum clock frequency too high for identification modeSigned-off-by: Marek Szyprowski
Signed-off-by: Kyungmin Park
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
On Samsung's SDMMC hosts the timeout clock is derivied from the SD Clock
which is set dynamically. So checked SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK
quirk and removed 'sdhci_s3c_get_timeout_clk' callback which doesn't need
any more.Signed-off-by: Hyuk Lee
Signed-off-by: Kukjin Kim
Cc: Ben Dooks
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
If other informative interrupts are enabled for the DMA channel used by
hsmmc, those are incorrectly treated as block completion. This patch lets
only the block completion interrupt to be processed.Signed-off-by: Venkatraman S
Acked-by: Madhusudhan Chikkature
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
CONFIG_MMC_MSM7X00A_RESUME_IN_WQ and CONFIG_MMC_EMBEDDED_SDIO don't exist
in Kconfig and is never defined anywhere else, therefore removing all
references for it from the source code.Signed-off-by: Christian Dietrich
Acked-by: David Brown
Cc: Daniel Walker
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds