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=-0.8 required=3.0 tests=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 DA97BC31E40 for ; Mon, 12 Aug 2019 11:07:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AFEF720842 for ; Mon, 12 Aug 2019 11:07:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728192AbfHLLHi (ORCPT ); Mon, 12 Aug 2019 07:07:38 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:45225 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728108AbfHLLHh (ORCPT ); Mon, 12 Aug 2019 07:07:37 -0400 Received: by mail-ot1-f66.google.com with SMTP id m24so4207608otp.12; Mon, 12 Aug 2019 04:07:36 -0700 (PDT) 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=qHM6FDOhsRzjTSd8loKknXcNLEK6jv1Ba3F/sVhpvak=; b=V8zbj8r1zNgjNGOFYxEC34ZR4s8pmp4gtsacmjQXVxiXHqJBBN3ExpdMrrAIMpE+Au FRbss/YYVh4PcvCGxDTpt3EH8vblP9z2yXtcZVrPytb8poTZhysh53sozNxZ27/HQsd+ 7EuM5JxFeDF0tSqMJF121lGLfCZCbUTez/GMS+BK2jIvvIlb8ADVgLsR99pCByLuMIlg coni3sp3jUKISnFxYWly8LBFR7pQfNr3wHhfybF/8iQus1YiWOlUL5SB7MmNVJ8VLnIn BFLjlhRTH/WOJN8Jc+vUKK0r5SdNd5mKG+MyWRnATHljN/sgL6pnTE/V3I4tqT42MlLB JGww== X-Gm-Message-State: APjAAAWZEk8+k2lTwjzXYwQwD1usKg2of9aAHUjahZfV6YYJFOZBrdqE 8XRyHadBfIIabQmruPHw9Ag7SFN2sV2XMdlh1k1Fy9d7 X-Google-Smtp-Source: APXvYqzmaEY+qGiEtJ5HvmGixD/Xz77NLpsNYxYeCejZoLaZ6fsmS4oeCoZJrN9r13ht5HpGdDdIy0RLNV0Px8B6FBY= X-Received: by 2002:a05:6830:210f:: with SMTP id i15mr29933428otc.250.1565608056546; Mon, 12 Aug 2019 04:07:36 -0700 (PDT) MIME-Version: 1.0 References: <20190811043253.24938-1-max@enpas.org> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 12 Aug 2019 13:07:25 +0200 Message-ID: Subject: Re: [PATCH] i2c/busses: Add i2c-icy for I2C on m68k/Amiga To: Max Staudt Cc: Linux I2C , Wolfram Sang , "Linux/m68k" , Linux Kernel Mailing List , John Paul Adrian Glaubitz Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Max, On Mon, Aug 12, 2019 at 12:43 PM Max Staudt wrote: > On 08/12/2019 11:37 AM, Geert Uytterhoeven wrote: > >> + /* > >> + * The 2019 a1k.org PCBs have an LTC2990 at 0x4c, so start > >> + * it automatically once ltc2990 is modprobed. > >> + * > >> + * in0 is the voltage of the internal 5V power supply. > >> + * temp1 is the temperature inside the chip. > >> + * > >> + * Configuration 0x18 enables all sensors on this PCB: > >> + * # modprobe i2c-dev > >> + * # i2cset 0 0x4c 1 0x18 > > > > What's the reason for the i2cset command? > > It sets the sensor modes in the LTC2990 and enables the three sensors listed below. I should have clarified this. > > I tried to integrate this in the driver, but ltc2990 only allows reading this configuration out of a device tree. Is there a good way to fake a DT entry in the init function? You can add platform_data support to the ltc2990 driver, and pass it through i2c_board_info.platform_data. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds