lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 28 Sep 2010 15:35:39 +0900
From:	"Masayuki Ohtake" <masa-korg@....okisemi.com>
To:	"Mark Brown" <broonie@...nsource.wolfsonmicro.com>
Cc:	"Mike Frysinger" <vapier@...too.org>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Samuel Ortiz" <sameo@...ux.intel.com>,
	"Randy Dunlap" <randy.dunlap@...cle.com>,
	"Alek Du" <alek.du@...el.com>, <richard.rojfors@...ean-labs.com>,
	<meego-dev@...go.com>,
	"ML linux-kernel" <linux-kernel@...r.kernel.org>,
	"Qi" <qi.wang@...el.com>, <andrew.chih.howe.khor@...el.com>,
	<gregkh@...e.de>, "Yong Y" <yong.y.wang@...el.com>,
	"Tomoya MORINAGA" <morinaga526@....okisemi.com>,
	<joel.clark@...el.com>, <margie.foster@...el.com>,
	<kok.howg.ewe@...el.com>
Subject: Re: [MeeGo-Dev][PATCH] Topcliff: Update PCH_GPIO driver to 2.6.35

Hi Mark,

> Your mail client has for some reason chosen to uuencode the attachment
> so it's going to be difficult for most people to read it.

Sorry, I copied to mail body.

static void pch_gpio_setup(struct pch_gpio_chip *chip)
{
    struct gpio_chip *gpio = &chip->gpio;

    gpio->label = dev_name(chip->dev);
    gpio->owner = THIS_MODULE;
    gpio->direction_input = pch_gpio_direction_input;
    gpio->get = pch_gpio_get;
    gpio->direction_output = pch_gpio_direction_output;
    gpio->set = pch_gpio_set;
    gpio->dbg_show = NULL;
    gpio->base = (u32)chip->pch_gpio_base_address;
    gpio->ngpio = 12;
    gpio->can_sleep = 0;
}


static s32 __devinit pch_gpio_probe(struct pci_dev *pdev,
        const struct pci_device_id *id)
{
    s32 ret;
    struct pch_gpio_chip *chip;

    chip = kzalloc(sizeof(struct pch_gpio_chip), GFP_KERNEL);
    if (chip == NULL)
         return -ENOMEM;

    chip->dev = &pdev->dev;

    ret = pci_enable_device(pdev);
    if (ret) {
        dev_err(&pdev->dev, "%s : pci_enable_device FAILED", __func__);
        goto err_pci_enable;
    }

    ret = pci_request_regions(pdev, MODULE_NAME);
    if (ret) {
        dev_err(&pdev->dev, "%s : pci_request_regions FAILED",
            __func__);
        goto err_request_regions;
    }

    chip->pch_gpio_base_address = pci_iomap(pdev, 1, 0);

    if (chip->pch_gpio_base_address == 0) {
        dev_err(&pdev->dev, "%s : pci_iomap FAILED", __func__);
        ret = -ENOMEM;
        goto err_iomap;
    }
    chip->reg = chip->pch_gpio_base_address;

    pci_set_drvdata(pdev, chip);
    pch_gpio_cb_register(pch_gpio_cb, chip);
    chip->pch_gpio_irq = pdev->irq;
    device_set_wakeup_enable(&pdev->dev, 1);

    pch_gpio_setup(chip);
    ret = gpiochip_add(&chip->gpio);
    if (ret) {
        printk(KERN_ERR "PCH gpio: Failed to register GPIO\n");
        goto err_gpiochip_add;
    }

    return 0;

err_gpiochip_add:
    pci_iounmap(pdev, chip->pch_gpio_base_address);

err_iomap:
    pci_release_regions(pdev);

err_request_regions:
    pci_disable_device(pdev);

err_pci_enable:
    kfree(chip);

    return ret;
}

Thanks, Ohtake(OKISemi)

----- Original Message ----- 
From: "Mark Brown" <broonie@...nsource.wolfsonmicro.com>
To: "Masayuki Ohtake" <masa-korg@....okisemi.com>
Cc: "Mike Frysinger" <vapier@...too.org>; "Andrew Morton" <akpm@...ux-foundation.org>; "Samuel Ortiz"
<sameo@...ux.intel.com>; "Randy Dunlap" <randy.dunlap@...cle.com>; "Alek Du" <alek.du@...el.com>;
<richard.rojfors@...ean-labs.com>; <meego-dev@...go.com>; "ML linux-kernel" <linux-kernel@...r.kernel.org>; "Qi"
<qi.wang@...el.com>; <andrew.chih.howe.khor@...el.com>; <gregkh@...e.de>; "Yong Y" <yong.y.wang@...el.com>; "Tomoya
MORINAGA" <morinaga526@....okisemi.com>; <joel.clark@...el.com>; <margie.foster@...el.com>; <kok.howg.ewe@...el.com>
Sent: Tuesday, September 28, 2010 2:29 PM
Subject: Re: [MeeGo-Dev][PATCH] Topcliff: Update PCH_GPIO driver to 2.6.35


> On Tue, Sep 28, 2010 at 02:25:36PM +0900, Masayuki Ohtake wrote:
>
> > > find out what range of GPIO numbers your driver is using and use those
> > > instead of "1"
> > I have attached a part of our source file.
>
> > Since I set "ngpio=12",
> > I guess 0-11 can be used, thus, "echo 1 > export" should be success too.
> > Is this true ?
>
> > begin 666 pch_gpio.c
> > M<W1A=&EC('9O:60@<&-H7V=P:6]?<V5T=7 H<W1R=6-T('!C:%]G<&EO7V-H
> > M:7 @*F-H:7 I#0I[#0H)<W1R=6-T(&=P:6]?8VAI<" J9W!I;R ]("9C:&EP
>
> Your mail client has for some reason chosen to uuencode the attachment
> so it's going to be difficult for most people to read it.  If you have
> debugfs enabled and mounted you can see the current GPIO banks in the
> file 'gpio' under debugfs.
>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ