Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753400AbbBZJIn (ORCPT ); Thu, 26 Feb 2015 04:08:43 -0500 Received: from bhuna.collabora.co.uk ([93.93.135.160]:53930 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751399AbbBZJIi (ORCPT ); Thu, 26 Feb 2015 04:08:38 -0500 Message-ID: <54EEE28F.8000307@collabora.co.uk> Date: Thu, 26 Feb 2015 10:08:31 +0100 From: Javier Martinez Canillas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: Olof Johansson , Gwendal Grignou CC: Lee Jones , Doug Anderson , Bill Richardson , Simon Glass , Jonathan Corbet , Varka Bhadram , Paul Bolle , linux-samsung-soc@vger.kernel.org, Linux Kernel Subject: Re: [PATCH v5 4/7] platform/chrome: Add Chrome OS EC userspace device interface References: <1422876388-16540-1-git-send-email-javier.martinez@collabora.co.uk> <1422876388-16540-5-git-send-email-javier.martinez@collabora.co.uk> <20150226005425.GA3101@quad.lixom.net> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1190 Lines: 39 Hello Olof, Thanks a lot for your feedback. On 02/26/2015 02:13 AM, Gwendal Grignou wrote: > Olof, > > I think the way Javier did it is fine, the 'major' of the ioctl is > 0xEC, from ':'. > > Gwendal. > As Gwendal said, I deliberately changed the IOCTL mayor number to make it different in both kernels. downstream: #define CROS_EC_DEV_IOC ':' #define CROS_EC_DEV_IOCXCMD _IOWR(':', 0, struct cros_ec_command) #define CROS_EC_DEV_IOCRDMEM _IOWR(':', 1, struct cros_ec_readmem) mainline: #define CROS_EC_DEV_IOC 0xEC #define CROS_EC_DEV_IOCXCMD _IOWR(CROS_EC_DEV_IOC, 0, struct cros_ec_command) #define CROS_EC_DEV_IOCRDMEM _IOWR(CROS_EC_DEV_IOC, 1, struct cros_ec_readmem) I can also do what you suggested and keep ':' as the major and use 2/3 as command numbers but I just think 0xEC is a much nicer major for the interface to talk with the Embedded Controller and it was available ;) Best regards, Javier -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/