From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 2/2] viafb: Add OLPC XO-1.5 port configs
Date: Tue, 21 Sep 2010 17:15:06 +0000 [thread overview]
Message-ID: <4C98E81A.80309@gmx.de> (raw)
In-Reply-To: <20100921153726.21D609D401B@zog.reactivated.net>
Daniel Drake schrieb:
> The OLPC XO-1.5 does not use the standard port wiring suggested
> in the viafb driver.
>
> This is required for the upcoming OLPC DCON and via-camera drivers,
> to be submitted soon.
Why? What happens if this patch is not applied?
Please understand, that I, as a maintainer, try to avoid platform specific code
as much as possible so a little explanation would be good.
Thanks,
Florian Tobias Schandinat
> Signed-off-by: Daniel Drake <dsd@laptop.org>
> ---
> drivers/video/via/via-core.c | 25 +++++++++++++++++++++++++
> 1 files changed, 25 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/video/via/via-core.c b/drivers/video/via/via-core.c
> index 08390fe..a0efb8f 100644
> --- a/drivers/video/via/via-core.c
> +++ b/drivers/video/via/via-core.c
> @@ -16,6 +16,10 @@
> #include <linux/interrupt.h>
> #include <linux/platform_device.h>
>
> +#ifdef CONFIG_OLPC
> +#include <asm/olpc.h>
> +#endif
> +
> /*
> * The default port config.
> */
> @@ -28,6 +32,21 @@ static const struct via_port_cfg adap_configs[] = {
> { 0, 0, 0, 0 }
> };
>
> +#ifdef CONFIG_OLPC
> +/*
> + * The OLPC XO-1.5 puts the camera power and reset lines onto
> + * GPIO 2C. The configuration for 26 is also modified.
> + */
> +static const struct via_port_cfg olpc_adap_configs[] = {
> + [VIA_PORT_26] = { VIA_PORT_I2C, VIA_MODE_I2C, VIASR, 0x26 },
> + [VIA_PORT_31] = { VIA_PORT_I2C, VIA_MODE_I2C, VIASR, 0x31 },
> + [VIA_PORT_25] = { VIA_PORT_GPIO, VIA_MODE_GPIO, VIASR, 0x25 },
> + [VIA_PORT_2C] = { VIA_PORT_GPIO, VIA_MODE_GPIO, VIASR, 0x2c },
> + [VIA_PORT_3D] = { VIA_PORT_GPIO, VIA_MODE_GPIO, VIASR, 0x3d },
> + { 0, 0, 0, 0 }
> +};
> +#endif
> +
> /*
> * We currently only support one viafb device (will there ever be
> * more than one?), so just declare it globally here.
> @@ -575,6 +594,12 @@ static int __devinit via_pci_probe(struct pci_dev *pdev,
> global_dev.pdev = pdev;
> global_dev.chip_type = ent->driver_data;
> global_dev.port_cfg = adap_configs;
> +
> +#ifdef CONFIG_OLPC
> + if (machine_is_olpc())
> + global_dev.port_cfg = olpc_adap_configs;
> +#endif
> +
> spin_lock_init(&global_dev.reg_lock);
> ret = via_pci_setup_mmio(&global_dev);
> if (ret)
next prev parent reply other threads:[~2010-09-21 17:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 15:37 [PATCH 2/2] viafb: Add OLPC XO-1.5 port configs Daniel Drake
2010-09-21 17:15 ` Florian Tobias Schandinat [this message]
2010-09-21 17:15 ` Daniel Drake
2010-09-21 17:54 ` Florian Tobias Schandinat
2010-09-26 14:57 ` Daniel Drake
2010-09-26 15:50 ` Florian Tobias Schandinat
2010-09-26 15:57 ` Daniel Drake
2010-09-26 21:52 ` Jonathan Corbet
2010-09-27 4:55 ` Florian Tobias Schandinat
2010-10-06 21:15 ` Jonathan Corbet
2010-10-27 15:08 ` Daniel Drake
2010-10-28 18:51 ` Jonathan Corbet
2010-10-28 21:54 ` Daniel Drake
2010-10-28 22:04 ` Jonathan Corbet
2010-10-29 14:03 ` Daniel Drake
2010-11-11 14:59 ` Daniel Drake
2010-11-11 16:01 ` Florian Tobias Schandinat
2010-11-11 17:07 ` Daniel Drake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C98E81A.80309@gmx.de \
--to=florianschandinat@gmx.de \
--cc=linux-fbdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.