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.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 96A22C433ED for ; Wed, 28 Apr 2021 13:47:07 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A8A6C61158 for ; Wed, 28 Apr 2021 13:47:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8A6C61158 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1lbkWP-0007WB-6m; Wed, 28 Apr 2021 09:46:33 -0400 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (Exim 4.94) (envelope-from ) id 1lbkWM-0007VC-4k for kernelnewbies@kernelnewbies.org; Wed, 28 Apr 2021 09:46:31 -0400 Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 28 Apr 2021 22:46:19 +0900 X-Original-SENDERIP: 211.180.235.153 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: kernelnewbies@kernelnewbies.org Received: from [10.162.225.112] (HELO smtp002-imp.gov-dooray.com) ([10.162.225.112]) by send002-relay.gov-dooray.com with SMTP id 71893b936089672e; Wed, 28 Apr 2021 22:46:22 +0900 DKIM-Signature: a=rsa-sha256; b=PRNnBY3QYGwFGWNPzj5DHvoQRMtkI10SHdFtAiFWfB1E4SBo0YnAqqbZmaHM0sp+1o7QtjO/wM cgPT8LWx70g3gv31TT04fITvwkE1mEpz6b/Y68RjipoEBA93u5+f0aE7K+b481GBf59Z4BLsY2tw j3jv56ibmrG4nQE8XrnTYUm7NurF2HV1fyCxZj8pkCj9k52wtk+Ni/OG5P0ICSdYZtH6Ft3NaHVQ KbuExaE+AGM91nSnDYCRmi+hlCYBuPvfxWBHJE9zX0ccw8h2mShlaLHwYF63bYjSWSq1s6StSNuE LQttxchgbm7xkF/N0usbYcZdEChIEQdckHzX7lIA==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=SRoMzaVgnZ4uoap3kMVhoSVlTVtfjeaeIvwlOKbhelc=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp002-imp.gov-dooray.com with SMTP id e02fddf56089672d; Wed, 28 Apr 2021 22:46:22 +0900 From: To: Subject: can't find device_create funtion in a driver containing cdev (habanalabs) Date: Wed, 28 Apr 2021 22:46:21 +0900 Message-ID: <014d01d73c34$df6dcd00$9e496700$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: Adc8NNc1q41GtKqkTlCQ9cdnaoIzpQ== X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5711487209591509378==" Errors-To: kernelnewbies-bounces@kernelnewbies.org This is a multipart message in MIME format. --===============5711487209591509378== Content-Type: multipart/alternative; boundary="----=_NextPart_000_014E_01D73C80.4F55EA30" Content-Language: ko This is a multipart message in MIME format. ------=_NextPart_000_014E_01D73C80.4F55EA30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello list members, In habanalabs' goya chip driver, (https://elixir.bootlin.com/linux/v5.4.21/source/drivers/misc/habanalabs/dev ice.c#L1057) I can see cdev_init, cdev_add and class_create functions. Cdev_init is called insde device_init_cdev and cdev_add is called from device_cdev_sysfs_add -> cdev_device_add. I can see class_create being called too. But I couldn't find device_create function (which is used to make sysfs entry?) Can anyone tell me where device_create is called? (or where alternative method is being used?) Thank you! Chan Kim ------=_NextPart_000_014E_01D73C80.4F55EA30 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello list = members,

In = habanalabs’ goya chip driver, (https://elixir.bootlin.com/linux/v5.4.21/source/dr= ivers/misc/habanalabs/device.c#L1057)

I can see cdev_init, cdev_add and = class_create functions.

Cdev_init is called insde device_init_cdev and cdev_add is = called from device_cdev_sysfs_add -> = cdev_device_add.

I can see class_create being called too. But I = couldn’t find device_create function (which is used to make sysfs = entry?)

Can = anyone tell me where device_create is called? (or where alternative = method is being used?)

Thank you!

Chan Kim

 

------=_NextPart_000_014E_01D73C80.4F55EA30-- --===============5711487209591509378== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============5711487209591509378==--