All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] i2c: intel_i2c: SMBus driver PCI addition (e.g. BayTrail)
Date: Tue, 16 Aug 2016 07:03:58 +0200	[thread overview]
Message-ID: <57B29EBE.809@denx.de> (raw)
In-Reply-To: <CAPnjgZ3B8LCNPkNz1wVCjQPNw_Eht6RJGdJVmM=mcMSB+fen7w@mail.gmail.com>

Hello Simon, Stefan,

Am 16.08.2016 um 06:50 schrieb Simon Glass:
> Hi Stefan,
>
> On 15 August 2016 at 04:02, Stefan Roese <sr@denx.de> wrote:
>> Hi Simon,
>>
>>
>> On 10.08.2016 04:59, Simon Glass wrote:
>>>
>>> On 8 August 2016 at 23:41, Stefan Roese <sr@denx.de> wrote:
>>>>
>>>> This patch adds support for the SMBus block read/write functionality.
>>>> Other protocols like the SMBus quick command need to get added
>>>> if this is needed.
>>>>
>>>> This patch also removed the SMBus related defines from the Ivybridge
>>>> pch.h header. As they are integrated in this driver and should be
>>>> used from here. This change is added in this patch to avoid compile
>>>> breakage to keep the source git bisectable.
>>>>
>>>> Tested on a congatec BayTrail board to configure the SMSC2513 USB
>>>> hub.
>>>>
>>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>>> Cc: Bin Meng <bmeng.cn@gmail.com>
>>>> Cc: Simon Glass <sjg@chromium.org>
>>>> Cc: Heiko Schocher <hs@denx.de>
>>>> Cc: George McCollister <george.mccollister@gmail.com>
>>>> ---
>>>> v2:
>>>> - Avoid using BSS. Patch from Simon intergrated to fix problem before
>>>>    relocation.
>>>> - Remove IvyBridge code and add PCI device for IvyBridge (Panther Point
>>>>    PCH).
>>>> - Add overrun check to smbus_block_read() as suggested by George
>>>>
>>>>   arch/x86/include/asm/arch-ivybridge/pch.h |  26 ---
>>>>   drivers/i2c/intel_i2c.c                   | 290
>>>> +++++++++++++++++++++++++++---
>>>>   2 files changed, 269 insertions(+), 47 deletions(-)
>>>>
>>>
>>> This does not crash, but I see nothing on the bus with 'i2c dev 0; i2c
>>> probe'. Is that expected?
>>
>>
>> This depends on the devices available on the I2C bus. As SMBus defines
>> multiples protocols (byte read/write, block read/write...), and your
>> I2C devices probably don't support the currently implemented block
>> read/write protocol, we need to find a way configure / switch the SMBus
>> protocol. Do you have an idea on how to do this? Perhaps we need to add
>> a config call for this to switch between the different protocols? And
>> also add a way to do this from the cmdline. Perhaps "i2c flags" can be
>> used for this?
>
> Yes I suppose a flag is the best idea. You should be able to add one
> to the existing flags. Then it can be configured from the device or
> via the command line 'i2c flags'.

Yes, an "i2c flag" seems a good solution.

Hmm.. thinking about it ...

May we need such a functionality like in linux:/include/uapi/linux/i2c.h
I2C_FUNC_* and i2c_check_functionality() ?

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2016-08-16  5:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09  5:41 [U-Boot] [PATCH v2] i2c: intel_i2c: SMBus driver PCI addition (e.g. BayTrail) Stefan Roese
2016-08-10  2:59 ` Simon Glass
2016-08-12  1:41   ` Bin Meng
2016-08-15 10:02   ` Stefan Roese
2016-08-16  4:50     ` Simon Glass
2016-08-16  5:03       ` Heiko Schocher [this message]
2016-08-18  3:44         ` Simon Glass
  -- strict thread matches above, loose matches on Subject: below --
2016-08-10  8:37 Yaroslav K.

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=57B29EBE.809@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /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.