Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp902951ybl; Thu, 12 Dec 2019 06:43:36 -0800 (PST) X-Google-Smtp-Source: APXvYqxKOgjPqCLPkj2UUYE+Ay66djSgsqjz0Dps25g++SJysMoew9aiagVn8G/52v349cYIFLvp X-Received: by 2002:a05:6830:1e61:: with SMTP id m1mr8537816otr.68.1576161816609; Thu, 12 Dec 2019 06:43:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576161816; cv=none; d=google.com; s=arc-20160816; b=SWRHyKMIH0tUa0UxGcKzBnwQXxCERnjI6cGVxWOw2U929DQuFhKF3LDej9lONMQlO4 fLhJVSYPFZ9ZxQ+A3nLleTw9RmssIRDPukIsQ+RZXNjWfJTOUAhO7KyjIacmvAZohEpw a0cE41z/s4tKCI71qMHMS/Ut+p1tInFcJAnTaUe74ROCCYXY8JOonruKNKWLA6Xjkjk3 ksTK0noRoOeoxucWVVq+vz7pJbQKzrptopdf478TUjWqUTuHHH/5OLFTOSrbmFVz9ehe ljXCIlbWQm3UjQc02qY3zuzcWSSMsZpafA6+8MBBB4ZEZfiEpDXQ+/uQtiQX+tY3gpkB AfDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Qg1nXGsJx/EaOcrdsY8il0YWDhPcGBY4m54Yq52WwfA=; b=vyVEKQcGm1JuhpJOKGebJesEGfU/UJPE3MEOIeMdw3nEbfOI7hQg3yy4CCKowEkgM7 vF7Sqw9VraujeQtIeDXYVbelm7ZkWi3kQk5pOyd94Pg90pizvMOlFOoZfJYrd64bwqC2 9jJ5hpaEN5mb5eHpIx0b9tA8VbHl4c/nEsphB/sRm/WKi3kxq34eAXBeNX9QvvlgxxzO B+8I1Sm7KyKUYZflBZbVKpOpHoWMZXdEvmx7zs5jaEaVefbLJ79iH98Kj0SVyWxfaY0V gXh0eQcZklPIVyZmLsmgshVmh3ziLbV0z/h3UM8l7ENn88eVxyW2jnlgr57xy99GkjHd ti2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=diM2SA6u; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si3110821oie.261.2019.12.12.06.43.24; Thu, 12 Dec 2019 06:43:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=diM2SA6u; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729526AbfLLOmh (ORCPT + 99 others); Thu, 12 Dec 2019 09:42:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:53426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729266AbfLLOmh (ORCPT ); Thu, 12 Dec 2019 09:42:37 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2C2E020637; Thu, 12 Dec 2019 14:42:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576161755; bh=ck563JxppjwUrfE3D/tbAxjKAXIW9YCI6JybTAijvFI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=diM2SA6uv924om3crOT9thcoY4Fb421uI5NehQWj7fpPAhf+gd1OZ4zhkFH9vbhop sGXQtfYFoHJth1IbutmDeROzPxdpvK87+0hjqKVLPPjV6pZMSAT3NY35E0Fip3ZgsN cJLaPPxSd2YSoFiTjaLoau+ii/PKczv7tL91N4aE= Date: Thu, 12 Dec 2019 15:42:33 +0100 From: Greg KH To: Vitor Soares Cc: linux-kernel@vger.kernel.org, linux-i3c@lists.infradead.org, Joao.Pinto@synopsys.com, bbrezillon@kernel.org, wsa@the-dreams.de, arnd@arndb.de, broonie@kernel.org Subject: Re: [RFC 3/5] i3c: device: expose transfer strutures to uapi Message-ID: <20191212144233.GA1668196@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 10, 2019 at 04:37:31PM +0100, Vitor Soares wrote: > --- /dev/null > +++ b/include/uapi/linux/i3c/device.h > @@ -0,0 +1,66 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ Not a valid uapi SPDX license :( > +/* > + * Copyright (c) 2019 Synopsys, Inc. and/or its affiliates. > + * > + * Author: Vitor Soares > + */ > + > +#ifndef _UAPI_LINUX_I3C_DEVICE_H > +#define _UAPI_LINUX_I3C_DEVICE_H > + > +#include > + > +/** > + * enum i3c_error_code - I3C error codes > + * > + * These are the standard error codes as defined by the I3C specification. > + * When -EIO is returned by the i3c_device_do_priv_xfers() or > + * i3c_device_send_hdr_cmds() one can check the error code in > + * &struct_i3c_priv_xfer.err or &struct i3c_hdr_cmd.err to get a better idea of > + * what went wrong. > + * > + * @I3C_ERROR_UNKNOWN: unknown error, usually means the error is not I3C > + * related > + * @I3C_ERROR_M0: M0 error > + * @I3C_ERROR_M1: M1 error > + * @I3C_ERROR_M2: M2 error > + */ > +enum i3c_error_code { > + I3C_ERROR_UNKNOWN = 0, > + I3C_ERROR_M0 = 1, > + I3C_ERROR_M1, > + I3C_ERROR_M2, You have to specify all of these. > +}; > + > +/** > + * enum i3c_hdr_mode - HDR mode ids > + * @I3C_HDR_DDR: DDR mode > + * @I3C_HDR_TSP: TSP mode > + * @I3C_HDR_TSL: TSL mode > + */ > +enum i3c_hdr_mode { > + I3C_HDR_DDR, > + I3C_HDR_TSP, > + I3C_HDR_TSL, same here. > +}; > + > +/** > + * struct i3c_priv_xfer - I3C SDR private transfer > + * @rnw: encodes the transfer direction. true for a read, false for a write > + * @len: transfer length in bytes of the transfer > + * @data: input/output buffer > + * @data.in: input buffer. Must point to a DMA-able buffer > + * @data.out: output buffer. Must point to a DMA-able buffer > + * @err: I3C error code > + */ > +struct i3c_priv_xfer { > + u8 rnw; > + u16 len; > + union { > + void *in; > + const void *out; > + } data; > + enum i3c_error_code err; Ick, that's a horrid user/kernel api structure that will not work at all. Please fix. thanks, greg k-h