Age | Commit message (Collapse) | Author | Files | Lines |
|
This way, the probe function may register debugfs files if it wants to.
This fixes a bug with mmc_test where mmc_test_register_file_test() is
called before the card's debugfs dir exists, and so it fails.
Signed-off-by: Viresh Kumar <[email protected]>
Tested-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Signed-off-by: Chris Ball <[email protected]>
Tested-by: Chris Ball <[email protected]>
Acked-by: Olof Johansson <[email protected]>
|
|
Signed-off-by: Chris Ball <[email protected]>
|
|
Rewrite and clean up mmc_rescan() to properly retry frequencies lower
than 400kHz. Failures can happen both in sd_send_* calls and
mmc_attach_*. Break out "mmc_rescan_try_freq" from the frequency
selection loop. Symmetrize claim/release logic in mmc_attach_* API,
and move the sd_send_* calls there to make mmc_rescan easier to read.
Signed-off-by: Andy Ross <[email protected]>
Reviewed-and-Tested-by: Hein Tibosch <[email protected]>
Reviewed-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
With the bus-width test patch, mmc_set_bus_width*() isn't called properly
when the driver doesn't set MMC_CAP_BUS_WIDTH and no DDR mode.
This patch fixes the regression by moving the call up before the cap test.
Signed-off-by: Takashi Iwai <[email protected]>
Reviewed-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This adds the mmc host driver for the Synopsys DesignWare mmc
host controller, found in a number of embedded SoC designs.
Signed-off-by: Will Newton <[email protected]>
Reviewed-by: Matt Fleming <[email protected]>
Reviewed-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
SDHCI driver for Tegra. This driver plugs in as a new variant of
sdhci-pltfm, using the platform data structure passed in to specify the
GPIOs to use for card detect, write protect and card power enablement.
Original driver (of which only the header file is left):
Signed-off-by: Yvonne Yip <[email protected]>
The rest, which has been rewritten by now:
Signed-off-by: Olof Johansson <[email protected]>
Reviewed-by: Wolfram Sang <[email protected]>
Acked-by: Mike Rapoport <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Some controllers misparse segment length 0 as being 0, not 65536. Add
a quirk to deal with it.
Signed-off-by: Olof Johansson <[email protected]>
Reviewed-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Since we make sure the clock is enabled in the mmc_host_clk_exit()
function we should expect a reference counter of 1, not 0.
Signed-off-by: Linus Walleij <[email protected]>
Tested-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This patch supports controllers with no internal clock divider in SDHCI,
such as the s5pc210 board. The external clock divider can be used to
make a proper clock because SDHCI doesn't support internal clock divider
by itself.
If external clock divider type is selected, some functions related
to clock control will be overrided by other functions.
The current clock control index is added to let you know which
clock bus is used for SDHCI when overriding functions.
Checking functions are added into sdhci_s3c_consider_clock, because
the clock divider step is different from that of host controller.
Signed-off-by: Jeongbae Seo <[email protected]>
Cc: Jaehoon Chung <[email protected]>
Cc: Ben Dooks <[email protected]>
Signed-off-by: Kukjin Kim <[email protected]>
Acked-by: Kyungmin Park <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This patch adds support for additional host capabilities like SD/MMC
high speed, SDHCI bus width, etc.
Signed-off-by: Jeongbae Seo <[email protected]>
Signed-off-by: Kukjin Kim <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Some old MMC devices fail with the 4/8 bits the driver tries to use
exclusively. This patch adds a test for the given bus setup and falls
back to the lower bit mode (until 1-bit mode) when the test fails.
[Major rework and refactoring by tiwai]
[Quirk addition and many fixes by prakity]
Signed-off-by: Aries Lee <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Philip Rakity <[email protected]>
Tested-by: Philip Rakity <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This patch forward declares struct device_node to fix a compile error
when of_fdt.h is included, but of.h is not. Alternately, including
linux/of.h could have been added to of_fdt.h, but that pulls in a lot
of unnecessary declarations when only working with the flattened
form.
Signed-off-by: Grant Likely <[email protected]>
|
|
In case of failure, mmc_attach_sdio() will power off the SD bus.
Power it up and reinitialize before trying SD memory detection.
Reported-by: Sahitya Tummala <[email protected]>
Signed-off-by: Michał Mirosław <[email protected]>
Reviewed-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Upon system resume, SDIO core must reinitialize cards that were
powered off during suspend.
If the card had its power kept during suspend (and thus it is
'powered-resumed'), SDIO core performs only a limited reinitializing,
mainly needed to make sure that the card wasn't removed/replaced.
If a __nonremovable__ card is powered-resumed, we can safely skip the
reinitializing phase.
Note: 9b966aa (mmc: sdio: fully reconfigure oldcard on resume) removed
the bus width reconfiguration since mmc_sdio_init_card already does it.
It is brought back now in case mmc_sdio_init_card is skipped.
Signed-off-by: Ohad Ben-Cohen <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Initial SDIO runtime PM implementation took a conservative approach
of powering up cards (and fully reinitializing them) on system suspend,
just before the suspend handlers of the relevant drivers were executed.
To avoid redundant power and reinitialization cycles, this patch removes
this behavior: if a card is already powered off when system suspend kicks
in, it is left at that state.
If a card is active when a system sleep starts, everything is
straightforward and works exactly like before. But if the card was
already suspended before the sleep began, then when the MMC core powers
it back up on resume, its run-time PM status has to be updated to reflect
the actual post-system sleep status.
The technique to do that is borrowed from the I2C runtime PM
implementation (for more info see Documentation/power/runtime_pm.txt).
Signed-off-by: Ohad Ben-Cohen <[email protected]>
Reviewed-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
mmc_rescan() checks whether registered cards are still present before
skipping them, by calling the bus-specific ->detect() handler.
With buses that support runtime PM, the card may be powered off at
this point, so they need to be powered on and fully reinitialized before
->detect() executes.
This whole process is redundant with nonremovable cards; in those cases,
we can safely skip calling ->detect() and implicitly assume its success.
Signed-off-by: Ohad Ben-Cohen <[email protected]>
Reviewed-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
JMicron 388 SD/MMC combo controller supports the 1.8V low-voltage for
SD, but MMC doesn't work with the low-voltage, resulting in an error
at probing.
This patch adds the support for multiple voltage mask per device type,
so that SD works with 1.8V while MMC forces 3.3V. Here new ocr_avail_*
fields for each device are introduced, so that the actual OCR mask is
switched dynamically.
Also, the restriction of low-voltage in core/sd.c is removed when the
bit is allowed explicitly via ocr_avail_sd mask.
This patch was rewritten from scratch based on Aries' original code.
Signed-off-by: Aries Lee <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Reviewed-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
More information should be shown when sdhci_dumpregs is called.
Knowing the command is useful for debugging, and Capability 1
is useful for SD v3.
Signed-off-by: Philip Rakity <[email protected]>
Reviewed-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This patch modifies the MMC core code to optionally call the set_ios()
operation on the driver with the clock frequency set to 0 (gate) after
a grace period of at least 8 MCLK cycles, then restore it (ungate)
before any new request. This gives the driver the option to shut down
the MCI clock to the MMC/SD card when the clock frequency is 0, i.e.
the core has stated that the MCI clock does not need to be generated.
It is inspired by existing clock gating code found in the OMAP and
Atmel drivers and brings this up to the host abstraction. Gating is
performed before and after any MMC request.
This patchset implements this for the MMCI/PL180 MMC/SD host controller,
but it should be simple to switch OMAP/Atmel over to using this instead.
mmc_set_{gated,ungated}() add variable protection to the state holders
for the clock gating code. This is particularly important when ordinary
.set_ios() calls would race with the .set_ios() call resulting from a
delayed gate operation.
Signed-off-by: Linus Walleij <[email protected]>
Reviewed-by: Chris Ball <[email protected]>
Tested-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This patch disables the broken ADMA on selected O2Micro devices.
Signed-off-by: Jennifer Li <[email protected]>
Reviewed-by: Chris Ball <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Remove release_resource() after release_mem_region().
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Sascha Hauer <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This also fixes the build problem introduced by my previous patch
due to unhandled API changes introduced by commit:
99fc513101 (mmc: Move regulator handling closer to core)
Signed-off-by: Alberto Panizzo <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This implementation is based on the pxamci.c driver and it will
be used to support the mx31_3ds machine.
Signed-off-by: Alberto Panizzo <[email protected]>
Acked-by: Sascha Hauer <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Signed-off-by: Mike Rapoport <[email protected]>
CC: Saeed Bishara <[email protected]>
Acked-by: Wolfram Sang <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Implement an sdhci-pltfm driver for the controller found in the
Marvell Dove SoC.
Signed-off-by: Mike Rapoport <[email protected]>
CC: Saeed Bishara <[email protected]>
Acked-by: Wolfram Sang <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Signed-off-by: Urs Fleisch <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
The humidity attribute is already supported by the sht15 driver, and another
driver supporting it is about to be added. Make it official.
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Acked-by: Jean Delvare <[email protected]>
|
|
Add attributes supported by various PMBus devices to hwmon sysfs ABI.
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Signed-off-by: Jan Beulich <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Signed-off-by: Davide Rizzo <[email protected]>
[[email protected]: Formatting changes]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
This patch fixes all checkpatch errors and most of the checkpatch warnings.
It also fixes the range check in applesmc_store_fan_speed().
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Henrik Rydberg <[email protected]>
|
|
With the preceding patches, git blame assigns about half of
the file to the present author. Add a line to the copyright
to reflect this.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Make the driver report a single line on success.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Given the dynamic node construction method, the setup of the
accelerometer, light sensor and keyboard backlight sysfs nodes
can be simplified. This patch does not contain any logic changes.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
With the dynamic temperature group in place, the setup of fans
can be simplified. This patch sets up the fans dynamically, removing
a hundred lines of code.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
With temperature keys being determined automatically, the dmi match
data is only used to assign features that can easily be detected from
the smc. This patch removes the dmi match data altogether, and reduces
the match table to the main machine models.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
The recent Macbooks have temperature registers of a new type.
This patch adds the logic to handle them.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
The current driver creates temperature files based on a list
of temperature keys given per device. Apart from slow adaption
to new machine models, the number of sensors also depends on
the number of processors. This patch looks up the temperature
keys dynamically, thereby supporting all models.
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
One main problem with the current driver is the inability to quickly
search for supported keys, resulting in detailed feature maps per
machine model which are cumbersome to maintain.
This patch adds a register lookup table, which enables binary search
for supported keys. The lookup also reduces the io frequency, so the
original mutex is replaced by locks around the actual io.
Signed-off-by: Henrik Rydberg <[email protected]>
[[email protected]: Added value range check to key_at_index_store()]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
The device init is used to reset the accelerometer. Failure to reset
is not severe enough to stop loading the module or to resume from
hibernation. This patch relaxes failure to a warning and drops
output in case of success.
Cc: [email protected]
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
This patch add support for the MacBookAir3,1 and MacBookAir3,2 to the
applesmc driver.
[[email protected]: minor cleanup]
Cc: [email protected]
Signed-off-by: Edgar Hucek <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|