Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361911
b: refs/heads/master
c: 61ec7e7
h: refs/heads/master
i:
  361909: 8b7574c
  361907: bdc62ae
  361903: f3f639f
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Mar 15, 2013
1 parent 0490728 commit efd0eef
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 62 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ec83bd2460ed6aed0e7f29f9e0633b054621c02
refs/heads/master: 61ec7e77d724f3150338ecaa2d16d4379b7498b1
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-at91/board-foxg20.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ static struct w1_gpio_platform_data w1_gpio_pdata = {
/* If you choose to use a pin other than PB16 it needs to be 3.3V */
.pin = AT91_PIN_PB16,
.is_open_drain = 1,
.ext_pullup_enable_pin = -EINVAL,
};

static struct platform_device w1_device = {
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-at91/board-stamp9g20.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ static struct spi_board_info portuxg20_spi_devices[] = {
static struct w1_gpio_platform_data w1_gpio_pdata = {
.pin = AT91_PIN_PA29,
.is_open_drain = 1,
.ext_pullup_enable_pin = -EINVAL,
};

static struct platform_device w1_device = {
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-ixp4xx/vulcan-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ static struct platform_device vulcan_max6369 = {

static struct w1_gpio_platform_data vulcan_w1_gpio_pdata = {
.pin = 14,
.ext_pullup_enable_pin = -EINVAL,
};

static struct platform_device vulcan_w1_gpio = {
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-pxa/raumfeld.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ static struct w1_gpio_platform_data w1_gpio_platform_data = {
.pin = GPIO_ONE_WIRE,
.is_open_drain = 0,
.enable_external_pullup = w1_enable_external_pullup,
.ext_pullup_enable_pin = -EINVAL,
};

struct platform_device raumfeld_w1_gpio_device = {
Expand Down
29 changes: 20 additions & 9 deletions trunk/drivers/misc/mei/hw-me.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,20 @@ static void mei_me_intr_disable(struct mei_device *dev)
mei_hcsr_set(hw, hcsr);
}

/**
* mei_me_hw_reset_release - release device from the reset
*
* @dev: the device structure
*/
static void mei_me_hw_reset_release(struct mei_device *dev)
{
struct mei_me_hw *hw = to_me_hw(dev);
u32 hcsr = mei_hcsr_read(hw);

hcsr |= H_IG;
hcsr &= ~H_RST;
mei_hcsr_set(hw, hcsr);
}
/**
* mei_me_hw_reset - resets fw via mei csr register.
*
Expand All @@ -169,18 +183,14 @@ static void mei_me_hw_reset(struct mei_device *dev, bool intr_enable)
if (intr_enable)
hcsr |= H_IE;
else
hcsr &= ~H_IE;

mei_hcsr_set(hw, hcsr);

hcsr = mei_hcsr_read(hw) | H_IG;
hcsr &= ~H_RST;
hcsr |= ~H_IE;

mei_hcsr_set(hw, hcsr);

hcsr = mei_hcsr_read(hw);
if (dev->dev_state == MEI_DEV_POWER_DOWN)
mei_me_hw_reset_release(dev);

dev_dbg(&dev->pdev->dev, "current HCSR = 0x%08x.\n", hcsr);
dev_dbg(&dev->pdev->dev, "current HCSR = 0x%08x.\n", mei_hcsr_read(hw));
}

/**
Expand Down Expand Up @@ -466,7 +476,8 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
mutex_unlock(&dev->device_lock);
return IRQ_HANDLED;
} else {
dev_dbg(&dev->pdev->dev, "FW not ready.\n");
dev_dbg(&dev->pdev->dev, "Reset Completed.\n");
mei_me_hw_reset_release(dev);
mutex_unlock(&dev->device_lock);
return IRQ_HANDLED;
}
Expand Down
18 changes: 18 additions & 0 deletions trunk/drivers/misc/mei/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,24 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled)
mei_cl_all_write_clear(dev);
}

void mei_stop(struct mei_device *dev)
{
dev_dbg(&dev->pdev->dev, "stopping the device.\n");

mutex_lock(&dev->device_lock);

cancel_delayed_work(&dev->timer_work);

mei_wd_stop(dev);

dev->dev_state = MEI_DEV_POWER_DOWN;
mei_reset(dev, 0);

mutex_unlock(&dev->device_lock);

flush_scheduled_work();
}




1 change: 1 addition & 0 deletions trunk/drivers/misc/mei/mei_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ static inline unsigned long mei_secs_to_jiffies(unsigned long sec)
void mei_device_init(struct mei_device *dev);
void mei_reset(struct mei_device *dev, int interrupts);
int mei_hw_init(struct mei_device *dev);
void mei_stop(struct mei_device *dev);

/*
* MEI interrupt functions prototype
Expand Down
52 changes: 7 additions & 45 deletions trunk/drivers/misc/mei/pci-me.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,44 +247,14 @@ static void mei_remove(struct pci_dev *pdev)

hw = to_me_hw(dev);

mutex_lock(&dev->device_lock);

cancel_delayed_work(&dev->timer_work);

mei_wd_stop(dev);
dev_err(&pdev->dev, "stop\n");
mei_stop(dev);

mei_pdev = NULL;

if (dev->iamthif_cl.state == MEI_FILE_CONNECTED) {
dev->iamthif_cl.state = MEI_FILE_DISCONNECTING;
mei_cl_disconnect(&dev->iamthif_cl);
}
if (dev->wd_cl.state == MEI_FILE_CONNECTED) {
dev->wd_cl.state = MEI_FILE_DISCONNECTING;
mei_cl_disconnect(&dev->wd_cl);
}

/* Unregistering watchdog device */
mei_watchdog_unregister(dev);

/* remove entry if already in list */
dev_dbg(&pdev->dev, "list del iamthif and wd file list.\n");

if (dev->open_handle_count > 0)
dev->open_handle_count--;
mei_cl_unlink(&dev->wd_cl);

if (dev->open_handle_count > 0)
dev->open_handle_count--;
mei_cl_unlink(&dev->iamthif_cl);

dev->iamthif_current_cb = NULL;
dev->me_clients_num = 0;

mutex_unlock(&dev->device_lock);

flush_scheduled_work();

/* disable interrupts */
mei_disable_interrupts(dev);

Expand All @@ -308,28 +278,20 @@ static int mei_pci_suspend(struct device *device)
{
struct pci_dev *pdev = to_pci_dev(device);
struct mei_device *dev = pci_get_drvdata(pdev);
int err;

if (!dev)
return -ENODEV;
mutex_lock(&dev->device_lock);

cancel_delayed_work(&dev->timer_work);
dev_err(&pdev->dev, "suspend\n");

/* Stop watchdog if exists */
err = mei_wd_stop(dev);
/* Set new mei state */
if (dev->dev_state == MEI_DEV_ENABLED ||
dev->dev_state == MEI_DEV_RECOVERING_FROM_RESET) {
dev->dev_state = MEI_DEV_POWER_DOWN;
mei_reset(dev, 0);
}
mutex_unlock(&dev->device_lock);
mei_stop(dev);

mei_disable_interrupts(dev);

free_irq(pdev->irq, dev);
pci_disable_msi(pdev);

return err;
return 0;
}

static int mei_pci_resume(struct device *device)
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/w1/masters/w1-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ static u8 w1_gpio_read_bit(void *data)
return gpio_get_value(pdata->pin) ? 1 : 0;
}

#if defined(CONFIG_OF)
static struct of_device_id w1_gpio_dt_ids[] = {
{ .compatible = "w1-gpio" },
{}
};
MODULE_DEVICE_TABLE(of, w1_gpio_dt_ids);
#endif

static int w1_gpio_probe_dt(struct platform_device *pdev)
{
Expand Down Expand Up @@ -158,7 +160,7 @@ static int w1_gpio_probe(struct platform_device *pdev)
return err;
}

static int __exit w1_gpio_remove(struct platform_device *pdev)
static int w1_gpio_remove(struct platform_device *pdev)
{
struct w1_bus_master *master = platform_get_drvdata(pdev);
struct w1_gpio_platform_data *pdata = pdev->dev.platform_data;
Expand Down Expand Up @@ -210,7 +212,7 @@ static struct platform_driver w1_gpio_driver = {
.of_match_table = of_match_ptr(w1_gpio_dt_ids),
},
.probe = w1_gpio_probe,
.remove = __exit_p(w1_gpio_remove),
.remove = w1_gpio_remove,
.suspend = w1_gpio_suspend,
.resume = w1_gpio_resume,
};
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/w1/w1.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,8 @@ void w1_search(struct w1_master *dev, u8 search_type, w1_slave_found_callback cb
tmp64 = (triplet_ret >> 2);
rn |= (tmp64 << i);

if (kthread_should_stop()) {
/* ensure we're called from kthread and not by netlink callback */
if (!dev->priv && kthread_should_stop()) {
mutex_unlock(&dev->bus_mutex);
dev_dbg(&dev->dev, "Abort w1_search\n");
return;
Expand Down
4 changes: 0 additions & 4 deletions trunk/init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ config BUILDTIME_EXTABLE_SORT

menu "General setup"

config EXPERIMENTAL
bool
default y

config BROKEN
bool

Expand Down

0 comments on commit efd0eef

Please sign in to comment.