From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45982C4707F for ; Thu, 27 May 2021 19:14:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2608A6139A for ; Thu, 27 May 2021 19:14:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233565AbhE0TPt (ORCPT ); Thu, 27 May 2021 15:15:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbhE0TPt (ORCPT ); Thu, 27 May 2021 15:15:49 -0400 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43C33C061574 for ; Thu, 27 May 2021 12:14:15 -0700 (PDT) Received: by mail-io1-xd2a.google.com with SMTP id o21so1615061iow.13 for ; Thu, 27 May 2021 12:14:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ku2NKkULVbfZwyW7jGY6ydjs2MLQ+KhB/I+lldp2vR8=; b=kbTLP7VTAtzKu0qPSneXDSwJ+SF2fSL/prm4RpBt1/7pkLgnCtyWeDXHcP+2dUReDq DqXEU6TnbR19e8kyI8bfOLOnDJCtSqIojsMJA/IyU/y1MxeJ/Lyyio01Ruv/0cHtgGf8 xEM7QcsFwf6cI2mS7SkFrDlWJE8ozjdn1dn7+x5xaoV5loIdYS8E5WdFaB+AarbrYpOp EfigtHFPun5x4eyhECCX7xMZtufl7BWQi8rklXV/cpZ5C3YVpbBsJZZZ23XiiaQbQKZt 6yukZ4ZNCYzDstjFWYMmk4+TESEJXGwL9PMUAaRhF9Pbn82FIKvilH1tDfhQlC21yhgZ 72gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ku2NKkULVbfZwyW7jGY6ydjs2MLQ+KhB/I+lldp2vR8=; b=ZfJ7Eq15ekH4dvvq43ZeYTJMdAvF8eoe0j5NHKTKBcrjn3RoaDJZ+UaEdq+oegirQe uNZpy2l/fhF6NYoN4cwZN5s+UEqDdi5GqQjvHJ8fD/uIKxfzPfo3EoPu9TFMra2sc+i3 A1TUa2femM0jf5WA8oMULVsPnYtr7TNtI35XAMbNIQf9G3pqd3GWTATUcnV0BcyNoVZU I4I3Kun3A81ujN6tLePbX5cJ5lVcz+mMJZUJp76k9Nb3vzYuSrdSPywTJMxq+xCSoAKo lesD4v3ohj7PDYD5pnVWDb7RJFuI2jw7hTddDH6hAawZYDXt1qHXYb4tC7lwCsXdIR05 Eanw== X-Gm-Message-State: AOAM533fl6gDgY1F4hkUHxbrtZPAUtqS2t3Zc9DKY0lyOugLLAy0SnHA EkonKXU/w6nR51HkHNjXciKAgIMsTznJQpujEri9Jg== X-Google-Smtp-Source: ABdhPJwLK92UjPLV/iWaoOZ28QkNvXI/OHgGYo6GnZV0AE2HhIPjkdcOfaB43SjFHLkJd6rT8y0RK4qJUG+Hdaq3+E0= X-Received: by 2002:a02:2a0b:: with SMTP id w11mr4995717jaw.22.1622142854642; Thu, 27 May 2021 12:14:14 -0700 (PDT) MIME-Version: 1.0 References: <20210430132735.127342-1-robert.marko@sartura.hr> <20210430134810.GA2714262@roeck-us.net> <2b990feb-dc26-debb-4f81-430bbc89b51c@roeck-us.net> <2a1a63c7-c9b0-e38d-df1d-7643ad493aba@roeck-us.net> <8152a109-d76d-4f85-9da2-fe0a56c2019f@roeck-us.net> <493e4da4-8f2b-9856-b538-6e95e3766d5e@roeck-us.net> <7af2d708-7e22-3970-7bf8-1cb23317cb55@roeck-us.net> <2ba03d58-a4de-b683-6169-3f12482aa29e@roeck-us.net> In-Reply-To: <2ba03d58-a4de-b683-6169-3f12482aa29e@roeck-us.net> From: Robert Marko Date: Thu, 27 May 2021 21:14:03 +0200 Message-ID: Subject: Re: [PATCH 1/3] hwmon: (pmbus) Add driver for Delta DPS-920AB PSU To: Guenter Roeck Cc: jdelvare@suse.com, corbet@lwn.net, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luka Perkov , jmp@epiphyte.org, Paul Menzel , Donald Buczek Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org On Thu, May 27, 2021 at 6:37 PM Guenter Roeck wrote: > > On 5/27/21 7:58 AM, Robert Marko wrote: > [ ... ] > > >>>>>> I tried applying the block support for mv64xx as well: > >>>>>> https://patchwork.ozlabs.org/project/linux-i2c/patch/20200118115820.9080-1-fuga@studiofuga.com/ > >>>> > >>>> That patch would be needed, but it looks buggy to me. This chunk: > >>>> > >>>> + drv_data->effective_length = data+1; > >>>> + drv_data->bytes_left = data+1; > >>>> + drv_data->msg->len = data+1; > >>>> > >>>> should be: > >>>> > >>>> + drv_data->effective_length = data+1; > >>>> + drv_data->bytes_left = data; > >>>> + drv_data->msg->len = data+1; > >>>> > >>>> It should also make sure that 'data' is not larger than I2C_SMBUS_BLOCK_MAX, > >>>> and bail out if it isn't. > >>> > >>> Yeah, I did not check the contents, I just saw 2 reviews and tested it > >>> since it can't hurt. > >> > >> That patch doesn't work at all. Make the above change, and also change > >> the type of effective_length from u32 to int, and try again. > > > > I was just looking and it, and doing the changes you recommended make > > no difference at all. > > > > Is the i2c controller compatible with marvell,mv78230-i2c ? > The block transfers would not work in that case. Let me know > and I'll send you a patch that might fix it. Yes, the CPU is Armada 7040 and I can see that compatible is marvell,mv78230-i2c indeed. It would be great if you have the patch, Regards Robert > > Guenter -- Robert Marko Staff Embedded Linux Engineer Sartura Ltd. Lendavska ulica 16a 10000 Zagreb, Croatia Email: robert.marko@sartura.hr Web: www.sartura.hr