linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: "Xu, Even" <even.xu@intel.com>,
	"jikos@kernel.org" <jikos@kernel.org>,
	"bentiss@kernel.org" <bentiss@kernel.org>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"Aaron, Ma" <aaron.ma@canonical.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"Sun, Xinpeng" <xinpeng.sun@intel.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: Re: [PATCH v2 01/22] HID: THC: Add documentation
Date: Fri, 15 Nov 2024 18:38:36 +0700	[thread overview]
Message-ID: <ZzcyvPjkhCutD9ER@archie.me> (raw)
In-Reply-To: <IA1PR11MB6098EC67DEAA5336F4F47B19F4242@IA1PR11MB6098.namprd11.prod.outlook.com>

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

On Fri, Nov 15, 2024 at 05:10:55AM +0000, Xu, Even wrote:
> 
> 
> > -----Original Message-----
> > From: Bagas Sanjaya <bagasdotme@gmail.com>
> > Sent: Friday, November 15, 2024 12:04 PM
> > To: Xu, Even <even.xu@intel.com>; jikos@kernel.org; bentiss@kernel.org;
> > corbet@lwn.net; Aaron, Ma <aaron.ma@canonical.com>
> > Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> > doc@vger.kernel.org; Sun, Xinpeng <xinpeng.sun@intel.com>; Srinivas
> > Pandruvada <srinivas.pandruvada@linux.intel.com>
> > Subject: Re: [PATCH v2 01/22] HID: THC: Add documentation
> > 
> > On Thu, Nov 14, 2024 at 01:33:55PM +0800, Even Xu wrote:
> > > +Touch Host Controller is the name of the IP block in PCH that interface with
> > Touch Devices (ex:
> > > +touchscreen, touchpad etc.). It is comprised of 3 key functional blocks:
> > > +- A natively half-duplex Quad I/O capable SPI master
> > > +- Low latency I2C interface to support HIDI2C compliant devices
> > > +- A HW sequencer with RW DMA capability to system memory
> > 
> > I see in my htmldocs output that the list above is long running paragraph instead.
> 
> You are right, let me fix it in next version.

OK.

> 
> > 
> > > +When THC is configured to SPI mode, opcodes are used for determining the
> > read/write IO mode.
> > > +There are some OPCode examples for SPI IO mode::
> > > +
> > > + +--------+---------------------------------+
> > > + | opcode |  Corresponding SPI command      |
> > > + +========+=================================+
> > > + |  0x0B  | Read Single I/O                 |
> > > + +--------+---------------------------------+
> > > + |  0x02  | Write Single I/O                |
> > > + +--------+---------------------------------+
> > > + |  0xBB  | Read Dual I/O                   |
> > > + +--------+---------------------------------+
> > > + |  0xB2  | Write Dual I/O                  |
> > > + +--------+---------------------------------+
> > > + |  0xEB  | Read Quad I/O                   |
> > > + +--------+---------------------------------+
> > > + |  0xE2  | Write Quad I/O                  |
> > > + +--------+---------------------------------+
> > > +
> > > <snipped>...
> > > +When THC is working in I2C mode, opcodes are used to tell THC what's the
> > next PIO type:
> > > +I2C SubIP APB register read, I2C SubIP APB register write, I2C touch
> > > +IC device read, I2C touch IC device write, I2C touch IC device write followed
> > by read.
> > > +
> > > +Here are the THC pre-defined opcodes for I2C mode::
> > > +
> > > + +--------+-------------------------------------------+----------+
> > > + | opcode |       Corresponding I2C command           | Address  |
> > > +
> > +========+===========================================+==========+
> > > + |  0x12  | Read I2C SubIP APB internal registers     | 0h - FFh |
> > > + +--------+-------------------------------------------+----------+
> > > + |  0x13  | Write I2C SubIP APB internal registers    | 0h - FFh |
> > > + +--------+-------------------------------------------+----------+
> > > + |  0x14  | Read external Touch IC through I2C bus    | N/A      |
> > > + +--------+-------------------------------------------+----------+
> > > + |  0x18  | Write external Touch IC through I2C bus   | N/A      |
> > > + +--------+-------------------------------------------+----------+
> > > + |  0x1C  | Write then read external Touch IC through | N/A      |
> > > + |        | I2C bus                                   |          |
> > > + +--------+-------------------------------------------+----------+
> > > +
> > > <snipped>...
> > > +Intel THC uses PRD entry descriptor for every PRD entry. Every PRD
> > > +entry descriptor occupies
> > > +128 bits memories::
> > > +
> > > + +-------------------+---------+------------------------------------------------+
> > > + | struct field      | bit(s)  | description                                    |
> > > +
> > +===================+=========+==================================
> > ===
> > > + +===========+
> > > + | dest_addr         | 53..0   | destination memory address, as every entry     |
> > > + |                   |         | is 4KB, ignore lowest 10 bits of address.      |
> > > + +-------------------+---------+------------------------------------------------+
> > > + | reserved1         | 54..62  | reserved                                       |
> > > + +-------------------+---------+------------------------------------------------+
> > > + | int_on_completion | 63      | completion interrupt enable bit, if this bit   |
> > > + |                   |         | set it means THC will trigger a completion     |
> > > + |                   |         | interrupt. This bit is set by SW driver.       |
> > > + +-------------------+---------+------------------------------------------------+
> > > + | len               | 87..64  | how many bytes of data in this entry.          |
> > > + +-------------------+---------+------------------------------------------------+
> > > + | end_of_prd        | 88      | end of PRD table bit, if this bit is set,      |
> > > + |                   |         | it means this entry is last entry in this PRD  |
> > > + |                   |         | table. This bit is set by SW driver.           |
> > > + +-------------------+---------+------------------------------------------------+
> > > + | hw_status         | 90..89  | HW status bits                                 |
> > > + +-------------------+---------+------------------------------------------------+
> > > + | reserved2         | 127..91 | reserved                                       |
> > > + +-------------------+---------+------------------------------------------------+
> > 
> > Shouldn't these tables be formatted as tables?
> 
> Good idea!
> Let's format them.

Just drop the literal block formatting, keeping the table as-is.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2024-11-15 11:38 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14  5:33 [PATCH v2 00/22] Add Intel Touch Host Controller drivers Even Xu
2024-11-14  5:33 ` [PATCH v2 01/22] HID: THC: Add documentation Even Xu
2024-11-14 13:16   ` Srinivas Pandruvada
2024-11-15  0:39     ` Xu, Even
2024-11-15  4:04   ` Bagas Sanjaya
2024-11-15  5:10     ` Xu, Even
2024-11-15 11:38       ` Bagas Sanjaya [this message]
2024-11-18  0:34         ` Xu, Even
2024-11-14  5:33 ` [PATCH v2 02/22] HID: intel-thc-hid: Add basic THC driver skeleton Even Xu
2024-11-14  5:41   ` Randy Dunlap
2024-11-14  5:56     ` Xu, Even
2024-11-14  5:33 ` [PATCH v2 03/22] HID: intel-thc-hid: intel-thc: Add THC registers definition Even Xu
2024-11-14  5:33 ` [PATCH v2 04/22] HID: intel-thc-hid: intel-thc: Add THC PIO operation APIs Even Xu
2024-12-04  5:37   ` Aaron Ma
2024-12-04  6:00     ` Xu, Even
2024-11-14  5:33 ` [PATCH v2 05/22] HID: intel-thc-hid: intel-thc: Add APIs for interrupt Even Xu
2024-11-14  5:34 ` [PATCH v2 06/22] HID: intel-thc-hid: intel-thc: Add THC DMA interfaces Even Xu
2024-11-14  5:34 ` [PATCH v2 07/22] HID: intel-thc-hid: intel-thc: Add THC LTR interfaces Even Xu
2024-11-14  5:34 ` [PATCH v2 08/22] HID: intel-thc-hid: intel-thc: Add THC interrupt handler Even Xu
2024-11-14  5:34 ` [PATCH v2 09/22] HID: intel-thc-hid: intel-thc: Add THC SPI config interfaces Even Xu
2024-11-14  5:34 ` [PATCH v2 10/22] HID: intel-thc-hid: intel-thc: Add THC I2C " Even Xu
2024-11-14  5:34 ` [PATCH v2 11/22] HID: intel-thc-hid: intel-quickspi: Add THC QuickSPI driver skeleton Even Xu
2024-11-14  5:44   ` Randy Dunlap
2024-11-14  5:59     ` Xu, Even
2024-11-14  5:34 ` [PATCH v2 12/22] HID: intel-thc-hid: intel-quickspi: Add THC QuickSPI driver hid layer Even Xu
2024-11-14  5:34 ` [PATCH v2 13/22] HID: intel-thc-hid: intel-quickspi: Add THC QuickSPI ACPI interfaces Even Xu
2024-11-14  5:34 ` [PATCH v2 14/22] HID: intel-thc-hid: intel-quickspi: Add HIDSPI protocol implementation Even Xu
2024-11-14  5:34 ` [PATCH v2 15/22] HID: intel-thc-hid: intel-quickspi: Complete THC QuickSPI driver Even Xu
2024-11-14  5:34 ` [PATCH v2 16/22] HID: intel-thc-hid: intel-quickspi: Add PM implementation Even Xu
2024-11-14  5:34 ` [PATCH v2 17/22] HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C driver skeleton Even Xu
2024-11-14  5:45   ` Randy Dunlap
2024-11-14  6:01     ` Xu, Even
2024-11-14  5:34 ` [PATCH v2 18/22] HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C driver hid layer Even Xu
2024-11-14  5:34 ` [PATCH v2 19/22] HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C ACPI interfaces Even Xu
2024-11-14  5:34 ` [PATCH v2 20/22] HID: intel-thc-hid: intel-quicki2c: Add HIDI2C protocol implementation Even Xu
2024-11-14  5:34 ` [PATCH v2 21/22] HID: intel-thc-hid: intel-quicki2c: Complete THC QuickI2C driver Even Xu
2024-11-14  5:34 ` [PATCH v2 22/22] HID: intel-thc-hid: intel-quicki2c: Add PM implementation Even Xu

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=ZzcyvPjkhCutD9ER@archie.me \
    --to=bagasdotme@gmail.com \
    --cc=aaron.ma@canonical.com \
    --cc=bentiss@kernel.org \
    --cc=corbet@lwn.net \
    --cc=even.xu@intel.com \
    --cc=jikos@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=xinpeng.sun@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).