LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jothi Adithya <jothiadithya@yahoo.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: SPI - ADS7846 driver
Date: Mon, 28 Dec 2009 05:23:27 -0800 (PST)	[thread overview]
Message-ID: <107858.98423.qm@web112304.mail.gq1.yahoo.com> (raw)
In-Reply-To: <mailman.3.1261962001.8147.linuxppc-dev@lists.ozlabs.org>

[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]

Hi

I am using Xilinx Virtex4 Powerpc. I am trying to interface with ADS7846 SPI touch screen controller. This is connected to the Xilinx SPI. The CS is connected to a GPIO & PEN_IRQ is connected to different GPIO.

My DTS is
            
             //Chip Select
              SPI_CS: gpio@81400000 {
compatible = "xlnx,xps-gpio-1.00.a";
reg = < 0x81400000 0x10000 >;
xlnx,all-inputs = <0x0>;
xlnx,all-inputs-2 = <0x0>;
xlnx,dout-default = <0x0>;
xlnx,dout-default-2 = <0x0>;
xlnx,family = "virtex4";
xlnx,gpio-width = <0x4>;
xlnx,interrupt-present = <0x0>;
xlnx,is-bidir = <0x1>;
xlnx,is-bidir-2 = <0x1>;
xlnx,is-dual = <0x0>;
xlnx,tri-default = <0xffffffff>;
xlnx,tri-default-2 = <0xffffffff>;
} ;

               //Touch Screen (ADS7846) pen irq
 
               ts_pen_irq: gpio@81c00000 {
compatible = "xlnx,xps-gpio-1.00.a";
interrupt-parent = <&xps_intc_0>;
interrupts = < 0 2 >;
reg = < 0x81c00000 0x10000 >;
xlnx,all-inputs = <0x1>;
xlnx,all-inputs-2 = <0x0>;
xlnx,dout-default = <0x0>;
xlnx,dout-default-2 = <0x0>;
xlnx,family = "virtex4";
xlnx,gpio-width = <0x1>;
xlnx,interrupt-present = <0x1>;
xlnx,is-bidir = <0x1>;
xlnx,is-bidir-2 = <0x1>;
xlnx,is-dual = <0x0>;
xlnx,tri-default = <0xffffffff>;
xlnx,tri-default-2 = <0xffffffff>;
} ;
       
               // This is SPI
               xps_spi_ts: xps-spi@42400000 {
compatible = "xlnx,xps-spi-2.00.b", "xlnx,xps-spi-2.00.a";
reg = < 0x42400000 0x200 >;
xlnx,family = "virtex4";
xlnx,fifo-exist = <0x0>;
xlnx,num-ss-bits = <0x1>;
xlnx,num-transfer-bits = <0x8>;
xlnx,sck-ratio = <0xd0>;
} ;

          when I include the ADS7846 info in virtex.c file, the ADS7846 is detected & I could see at /dev/input/event0. But I do not know how to call or access the particluat GPIO in virtex.c file for Chipselect & for Irq.

         Please let me know how to do this


      

[-- Attachment #2: Type: text/html, Size: 6341 bytes --]

           reply	other threads:[~2009-12-28 13:23 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <mailman.3.1261962001.8147.linuxppc-dev@lists.ozlabs.org>]

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=107858.98423.qm@web112304.mail.gq1.yahoo.com \
    --to=jothiadithya@yahoo.com \
    --cc=linuxppc-dev@lists.ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox