From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18278 invoked by alias); 24 Dec 2011 11:59:16 -0000 Received: (qmail 18255 invoked by uid 22791); 24 Dec 2011 11:59:15 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 24 Dec 2011 11:59:03 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id CA4632FB082C for ; Sat, 24 Dec 2011 11:59:01 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tr2bl-OI7VWI; Sat, 24 Dec 2011 11:59:00 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001397] I2C driver for Kinetic microcontrollers X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ilijak@siva.com.mk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sat, 24 Dec 2011 11:59:00 -0000 Message-Id: <20111224115900.06E272F78006@mail.ecoscentric.com> Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2011-12/txt/msg00051.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001397 --- Comment #8 from Ilija Kocho 2011-12-24 11:58:57 GMT --- (In reply to comment #7) > (In reply to comment #5) > > As there is existing devs/i2c directory, I propose following path: > > - devs/i2c/freescale/ > > OK, but the situation is exactly the same for the SLCD controller, and so we > end up with bits under devs/ and bits under hal/misc, with no clear logic for > the distinction I can see. > We need to distinguish/combine two sources of information: Device structure (registers, bits) Device instantiation (base address, pins, etc). Device structure is needed only by the driver and should live there (in driver's .c file or in a header file). Also the naming should be in device name space, common patterns are: CYGHWR_IO_I2C_FREESCALE_I2C_xxxx or CYGHWR_DEV_I2C_FREESCALE_I2C_xxx Device instants are HAL dependent, hence var_io_devs.h or plf_io.h. Example: var_io_devs.h ----------------------------- #define CYGHWR_IO_I2C_FREESCALE_I2C1_P \ ((cyghwr_io_i2c_freescale_i2c_t*)0x40067000) -------------------------------------------- plf_io.h ----------------------------------- #define CYGHWR_IO_I2C_FREESCALE_I2C0_PIN_SDA CYGHWR_HAL_KINETIS_PIN(D, 9, 2, 0) -------------------------------------------- > > > where is the name of this particular freescale spi instance > > (typically as referred to in ref. man.). > > The services have only generic names in the Freescale RMs, so we end up with > very generic names. That is fine if Freescale only make a single i2c controller > and never will design another one, perhaps that is the case? It seem that to be the case with i2c. I checked Coldfire+ seem to have the same i2c but PXN have some older version looks like some bits match but probably not all. Maybe we can use i2c now and if there's next entry with generic name we add the new device name some suffix/prefix. -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.