Skip to content

Commit

Permalink
Revert "mmc: tmio-mmc: Remove .set_pwr() callback from platform data"
Browse files Browse the repository at this point in the history
This reverts commit 3af9d15, which
causes a build failure:

drivers/mfd/asic3.c:724:2: error: unknown field 'set_pwr' specified in initializer
  • Loading branch information
Chris Ball committed Sep 6, 2013
1 parent b7d06c8 commit 9d731e7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mmc/host/tmio_mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ struct tmio_mmc_host {
enum tmio_mmc_power power;

/* Callbacks for clock / power control */
void (*set_pwr)(struct platform_device *host, int state);
void (*set_clk_div)(struct platform_device *host, int state);

/* pio related stuff */
Expand Down
7 changes: 7 additions & 0 deletions drivers/mmc/host/tmio_mmc_pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,9 @@ static void tmio_mmc_power_on(struct tmio_mmc_host *host, unsigned short vdd)

/* .set_ios() is returning void, so, no chance to report an error */

if (host->set_pwr)
host->set_pwr(host->pdev, 1);

if (!IS_ERR(mmc->supply.vmmc)) {
ret = mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
/*
Expand Down Expand Up @@ -810,6 +813,9 @@ static void tmio_mmc_power_off(struct tmio_mmc_host *host)

if (!IS_ERR(mmc->supply.vmmc))
mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);

if (host->set_pwr)
host->set_pwr(host->pdev, 0);
}

/* Set MMC clock / power.
Expand Down Expand Up @@ -996,6 +1002,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host **host,
_host->pdev = pdev;
platform_set_drvdata(pdev, mmc);

_host->set_pwr = pdata->set_pwr;
_host->set_clk_div = pdata->set_clk_div;

/* SD control register space size is 0x200, 0x400 for bus_shift=1 */
Expand Down
1 change: 1 addition & 0 deletions include/linux/mfd/tmio.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ struct tmio_mmc_data {
struct tmio_mmc_dma *dma;
struct device *dev;
unsigned int cd_gpio;
void (*set_pwr)(struct platform_device *host, int state);
void (*set_clk_div)(struct platform_device *host, int state);
int (*write16_hook)(struct tmio_mmc_host *host, int addr);
/* clock management callbacks */
Expand Down

0 comments on commit 9d731e7

Please sign in to comment.