Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp29033pxa; Thu, 20 Aug 2020 23:38:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxE0cZW3N8ExfQUf3knLGx434vZp07OgQynM1E35kDQrv4ZE83eM8FDGralU4mLcSBcllxa X-Received: by 2002:a05:6402:22bc:: with SMTP id cx28mr1348493edb.171.1597991906587; Thu, 20 Aug 2020 23:38:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597991906; cv=none; d=google.com; s=arc-20160816; b=gGtJBwWGloIFH/3Ltjp/7zp1GEe8nE/CW+9slYaX7/OauIMSzgXvnPEygIb+Wav4Qs ZFjDKAU6mwNx7sBGwHn352s5tK+RS9LwnlE4LMp93170MFO9Kf8SUHdb8u7NfvMaMPxc Aoo0lPjW128fofqumiAVY1t1s6Nu0Dzex5b9QYYEgC4FBsS50MMIalM1tSARMZkQgfS8 6ozjO5cxO6pZi3wx5pfOkKQJ54lsNlFeJbUlUKnSTjn9022pw8P//PesWPuLQh8EP0ia dXJaj4k6yJnZ4g+M1KRGhs/4GFnQWBpek8JHLqw8BCZ36w3kpV5/ny7mvnzu8/vqye4B vLqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=skZa9gs2C+QBUYUqWQg7XBlQIg3Lke8/gakwm3y/JJA=; b=s5z6U/t12ECFnBQ85Hen4kKbeT9EcqkIdr0Of8GptONxK+Mpc1e6PRJlJmuhborQ97 3TRazC/twlZ4cx23RsUVsFv+GiaKlPWArXrD+roWMSIWXZDk4I5CxpQiEzMBL9ZqZn/b EhibroMoGCc8i5Wb50e0cHAsVJ6KjnmfbksHTWqp+R61cEeubSFNMoM3SBo9dch6QET+ 3o862SAKa9jl+H+9GFxOJfHDhKqYI5kLTchQ7Ne1hrZkZJHcdAXPNCHMxJN5j7RPNpUj QOhgmYPpCl/2nZmnKlel6QTOSx7XhUMGapY0aFSTTWJ0fo/iikCxgK6SbAiXLiCABspt OXfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foundries-io.20150623.gappssmtp.com header.s=20150623 header.b=o+lduEZX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si575761ejq.352.2020.08.20.23.38.02; Thu, 20 Aug 2020 23:38:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@foundries-io.20150623.gappssmtp.com header.s=20150623 header.b=o+lduEZX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727049AbgHUGhE (ORCPT + 99 others); Fri, 21 Aug 2020 02:37:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725844AbgHUGhD (ORCPT ); Fri, 21 Aug 2020 02:37:03 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B40D4C061385 for ; Thu, 20 Aug 2020 23:37:02 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id a5so923301wrm.6 for ; Thu, 20 Aug 2020 23:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries-io.20150623.gappssmtp.com; s=20150623; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=skZa9gs2C+QBUYUqWQg7XBlQIg3Lke8/gakwm3y/JJA=; b=o+lduEZXzkFzTtm6Ava8WMK+NmvOzXsUluoVn8Q7oaUjnEQK/QwRaEND2VIkBOhgaU H+aF3TUkeHLkuLyu8DAKeU8zeJT7XSKUIHmYzxZu2EWjPjYjnBK1780vQCwBVK5Cb5nh t1TXRiYpsrAKSvHqetH1F99ZY669Pc4LTkuNnRaIEGkdqysfhuJzdXH58ZWJTtAFonmv XgeUTWD8CyU2zllj6Oda76zuPAyDOPR/1BhMv2ldhzIX+hr/ube09wJ418HLVuhByI0o bOIGyqya/tXJCF5rEfQXMk2+kHEei8thRLceAenb2jKEULfZS153FDfU3tZJsq5bskmy Y8Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=skZa9gs2C+QBUYUqWQg7XBlQIg3Lke8/gakwm3y/JJA=; b=sJ3+wqbUPnuZ92mcQGaR/ljsDUhVT9PYjA7q/AAxp/PMyon46y3H128K6GJ1XRc1gD x4mbGzZtvY3KB+qsvsvrUvwDdUyULCtoynAADmo6qkgh4UaFIhEpF37/Uc0H/rx/CiuS ao8zP2Q3PudRyZGG9l6+OahhfWx6+SS+9baalUyB2vFMB/xEInqBCvRxV9E4vtfOdEpf bZCSXP1SVejAuOzXkNWu/N5to//RRi6e3xjrTEiHRrrxb7Ga/uZqDfC5Ov2/Y3TwHaWk dHTVKsS43XvFs+58i7MrL8UONUVLGij+VxXm/OpWZ+kY/y/isuPZeJitoWtcdB2Pov3U fSrQ== X-Gm-Message-State: AOAM532GrDfxDn3KEMd9ByzX1eX/d2zl6OxjwQ8df17KV4z6Y4FFylwz fXXe9Sx0NexnAD6HG2myaEDZYA== X-Received: by 2002:adf:ab05:: with SMTP id q5mr1216136wrc.46.1597991821391; Thu, 20 Aug 2020 23:37:01 -0700 (PDT) Received: from trex (239.red-83-34-184.dynamicip.rima-tde.net. [83.34.184.239]) by smtp.gmail.com with ESMTPSA id g18sm2441618wru.27.2020.08.20.23.36.58 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Aug 2020 23:37:00 -0700 (PDT) From: "Jorge Ramirez-Ortiz, Foundries" X-Google-Original-From: "Jorge Ramirez-Ortiz, Foundries" Date: Fri, 21 Aug 2020 08:36:57 +0200 To: Jens Wiklander Cc: Jorge Ramirez-Ortiz , sumit.garg@linaro.org, ricardo@foundries.io, mike@foundries.io, tee-dev@lists.linaro.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv9] drivers: optee: allow op-tee to access devices on the i2c bus Message-ID: <20200821063657.GA20356@trex> References: <20200814111221.5813-1-jorge@foundries.io> <20200821062121.GA1020247@jade> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200821062121.GA1020247@jade> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/08/20, Jens Wiklander wrote: > On Fri, Aug 14, 2020 at 01:12:21PM +0200, Jorge Ramirez-Ortiz wrote: > > Some secure elements like NXP's SE050 sit on I2C buses. For OP-TEE to > > control this type of cryptographic devices it needs coordinated access > > to the bus, so collisions and RUNTIME_PM dont get in the way. > > > > This trampoline driver allow OP-TEE to access them. > > > > Signed-off-by: Jorge Ramirez-Ortiz > > --- > > v9: params return value must be written before optee_msg_to_param is called > > v8: review fixes: > > fix types and add TEEC_ERROR_NOT_SUPPORTED to GP errors > > v7: add support for ten bit i2c slave addressing > > v6: compile out if CONFIG_I2C not enabled > > v5: alphabetic order of includes > > v4: remove unnecessary extra line in optee_msg.h > > v3: use from/to msg param to support all types of memory > > modify OPTEE_MSG_RPC_CMD_I2C_TRANSFER message id > > > > drivers/tee/optee/optee_msg.h | 21 +++++++ > > drivers/tee/optee/optee_private.h | 1 + > > drivers/tee/optee/rpc.c | 95 +++++++++++++++++++++++++++++++ > > 3 files changed, 117 insertions(+) > > Looks good. Did you test this with the recently merged > https://github.com/OP-TEE/optee_os/pull/4033 ? > yes, I did retest and it is good. thanks! > Cheers, > Jens